diff options
author | Chris Robinson <[email protected]> | 2014-09-08 04:37:52 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2014-09-08 04:37:52 -0700 |
commit | 2be33d8a771a77bbcdf5809ea980bc8586a4fe22 (patch) | |
tree | 84c98edb0b43996efd512bed250c4f8f4b8a9a12 /common | |
parent | f38e88bc297d3c7e61a503f2e00c26cbdd7b2009 (diff) |
Only pass nano seconds to al_nssleep
Diffstat (limited to 'common')
-rw-r--r-- | common/threads.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/common/threads.c b/common/threads.c index c4593604..71fa6ab9 100644 --- a/common/threads.c +++ b/common/threads.c @@ -733,11 +733,11 @@ int altimespec_get(struct timespec *ts, int base) #endif -void al_nssleep(time_t sec, long nsec) +void al_nssleep(unsigned long nsec) { struct timespec ts, rem; - ts.tv_sec = sec; - ts.tv_nsec = nsec; + ts.tv_sec = nsec / 1000000000ul; + ts.tv_nsec = nsec % 1000000000ul; while(althrd_sleep(&ts, &rem) == -1) ts = rem; |