Skip to content

Commit 2983549

Browse files
committed
fix(log): add missing LIBIPC_LOG() in posix get_wait_time.h
- Add LIBIPC_LOG() to calc_wait_time() function - Add LIBIPC_LOG() to make_timespec() function - Both functions use log.error() and need the logger initialization
1 parent 0c4421d commit 2983549

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/libipc/platform/posix/get_wait_time.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ namespace posix_ {
1414
namespace detail {
1515

1616
inline bool calc_wait_time(timespec &ts, std::uint64_t tm /*ms*/) noexcept {
17+
LIBIPC_LOG();
1718
timeval now;
1819
int eno = ::gettimeofday(&now, NULL);
1920
if (eno != 0) {
@@ -27,6 +28,7 @@ inline bool calc_wait_time(timespec &ts, std::uint64_t tm /*ms*/) noexcept {
2728
}
2829

2930
inline timespec make_timespec(std::uint64_t tm /*ms*/) noexcept(false) {
31+
LIBIPC_LOG();
3032
timespec ts {};
3133
if (!calc_wait_time(ts, tm)) {
3234
log.error("fail calc_wait_time: tm = ", tm, ", tv_sec = ", ts.tv_sec, ", tv_nsec = ", ts.tv_nsec);

0 commit comments

Comments
 (0)