Changeset 63027 in vbox for trunk/src/VBox/Runtime/r3/posix/semmutex-posix.cpp
- Timestamp:
- Aug 5, 2016 2:44:59 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r3/posix/semmutex-posix.cpp
r63004 r63027 89 89 { 90 90 ts.tv_sec--; 91 ts.tv_nsec += 1000000000;91 ts.tv_nsec += RT_NS_1SEC; 92 92 } 93 93 … … 282 282 gettimeofday(&tv, NULL); 283 283 ts.tv_sec = tv.tv_sec; 284 ts.tv_nsec = tv.tv_usec * 1000;284 ts.tv_nsec = tv.tv_usec * RT_NS_1US; 285 285 #else 286 286 clock_gettime(CLOCK_REALTIME, &ts); … … 288 288 if (cMillies != 0) 289 289 { 290 ts.tv_nsec += (cMillies % 1000) * 1000000;291 ts.tv_sec += cMillies / 1000;292 if (ts.tv_nsec >= 1000000000)290 ts.tv_nsec += (cMillies % RT_MS_1SEC) * RT_NS_1MS; 291 ts.tv_sec += cMillies / RT_MS_1SEC; 292 if (ts.tv_nsec >= RT_NS_1SEC) 293 293 { 294 ts.tv_nsec -= 1000000000;294 ts.tv_nsec -= RT_NS_1SEC; 295 295 ts.tv_sec++; 296 296 }
Note:
See TracChangeset
for help on using the changeset viewer.