Only pass nano seconds to al_nssleep

This commit is contained in:
Chris Robinson
2014-09-08 04:37:52 -07:00
parent f38e88bc29
commit 2be33d8a77
6 changed files with 9 additions and 9 deletions
+3 -3
View File
@@ -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;