diff --git a/common/src/platform/linux/time.c b/common/src/platform/linux/time.c index 8f8cd17d..98ba3ac2 100644 --- a/common/src/platform/linux/time.c +++ b/common/src/platform/linux/time.c @@ -77,8 +77,8 @@ bool lgCreateTimer(const unsigned int intervalMS, LGTimerFn fn, struct timespec interval = { - .tv_sec = 0, - .tv_nsec = intervalMS * 1000 * 1000, + .tv_sec = intervalMS / 1000, + .tv_nsec = (intervalMS % 1000) * 1000000, }; struct itimerspec spec = {