Fixed unchanged functions

This commit is contained in:
Daniel Wang 2018-07-17 14:14:47 -04:00
parent 20db1e1f24
commit 106b57c676
No known key found for this signature in database
GPG Key ID: 82968CE7F0EA634E
1 changed files with 2 additions and 2 deletions

View File

@ -105,7 +105,7 @@ public:
if (time < std::numeric_limits<unsigned long>::max ()) {
struct timespec end_time;
clock_gettime (CLOCK_REALTIME, &end_time);
current_utc_time (&end_time);
end_time.tv_sec += (time / 1000);
end_time.tv_nsec += (time % 1000) * 1000000;
@ -308,7 +308,7 @@ bool Thread::wait (unsigned long time)
while (isRunning ()) {
struct timespec current_time;
clock_gettime (CLOCK_REALTIME, &current_time);
current_utc_time (&current_time);
if (end_time.tv_sec < current_time.tv_sec || (end_time.tv_sec == current_time.tv_sec && end_time.tv_nsec < current_time.tv_nsec)) {
return false;
}