summaryrefslogtreecommitdiffhomepage
path: root/compat/timer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'compat/timer.cpp')
-rw-r--r--compat/timer.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/compat/timer.cpp b/compat/timer.cpp
index dcf3f430..15e9d8a4 100644
--- a/compat/timer.cpp
+++ b/compat/timer.cpp
@@ -85,8 +85,8 @@ static void otr_clock_gettime(timespec* ts)
using t_s = decltype(ts->tv_sec);
using t_ns = decltype(ts->tv_nsec);
- ts->tv_sec = t_s(part / 1000000000);
- ts->tv_nsec = t_ns(part % 1000000000);
+ ts->tv_sec = t_s(part / 1000000000LL);
+ ts->tv_nsec = t_ns(part % 1000000000LL);
}
#elif defined __MACH__
@@ -106,8 +106,8 @@ static void otr_clock_gettime(timespec* ts)
uint64_t state, nsec;
state = mach_absolute_time();
nsec = state * timebase_info.numer / timebase_info.denom;
- ts->tv_sec = nsec / 1000000000L;
- ts->tv_nsec = nsec % 1000000000L;
+ ts->tv_sec = nsec / 1000000000UL;
+ ts->tv_nsec = nsec % 1000000000UL;
}
#endif