diff options
Diffstat (limited to 'examples/common/alhelpers.c')
-rw-r--r-- | examples/common/alhelpers.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/common/alhelpers.c b/examples/common/alhelpers.c index 730d2e13..0febef43 100644 --- a/examples/common/alhelpers.c +++ b/examples/common/alhelpers.c @@ -175,8 +175,8 @@ int altime_get(void) void al_nssleep(unsigned long nsec) { struct timespec ts, rem; - ts.tv_sec = nsec / 1000000000ul; - ts.tv_nsec = nsec % 1000000000ul; + ts.tv_sec = (time_t)(nsec / 1000000000ul); + ts.tv_nsec = (long)(nsec % 1000000000ul); while(nanosleep(&ts, &rem) == -1 && errno == EINTR) ts = rem; } |