mirror of
https://github.com/Karaka-Management/cOMS.git
synced 2026-02-14 09:28:41 +00:00
replace NULL with 0 in time function
This commit is contained in:
parent
593fbc9f89
commit
f8878d757a
|
|
@ -34,7 +34,7 @@ void ms_to_timespec(struct timespec *ts, unsigned int ms)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ts->tv_sec = (ms / 1000) + time(NULL);
|
ts->tv_sec = (ms / 1000) + time(0);
|
||||||
ts->tv_nsec = (ms % 1000) * 1000000;
|
ts->tv_nsec = (ms % 1000) * 1000000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -211,7 +211,7 @@ void ms_to_timespec(struct timespec *ts, unsigned int ms)
|
||||||
return INFINITE;
|
return INFINITE;
|
||||||
}
|
}
|
||||||
|
|
||||||
t = ((abstime->tv_sec - time(NULL)) * 1000) + (abstime->tv_nsec / 1000000);
|
t = ((abstime->tv_sec - time(0)) * 1000) + (abstime->tv_nsec / 1000000);
|
||||||
if (t < 0) {
|
if (t < 0) {
|
||||||
t = 1;
|
t = 1;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user