Changeset 52822 in vbox for trunk/src/VBox/Runtime/r3/linux
- Timestamp:
- Sep 23, 2014 10:25:34 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r3/linux/time-linux.cpp
r48935 r52822 5 5 6 6 /* 7 * Copyright (C) 2006-201 0Oracle Corporation7 * Copyright (C) 2006-2014 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 119 119 struct timespec ts; 120 120 if (!mono_clock(&ts)) 121 return (uint64_t)ts.tv_sec * (uint64_t)(1000 * 1000 * 1000)121 return (uint64_t)ts.tv_sec * RT_NS_1SEC_64 122 122 + ts.tv_nsec; 123 123 fMonoClock = false; … … 127 127 struct timeval tv; 128 128 gettimeofday(&tv, NULL); 129 return (uint64_t)tv.tv_sec * (uint64_t)(1000 * 1000 * 1000)130 + (uint64_t)(tv.tv_usec * 1000);129 return (uint64_t)tv.tv_sec * RT_NS_1SEC_64 130 + (uint64_t)(tv.tv_usec * RT_NS_1US); 131 131 } 132 132 … … 156 156 RTDECL(uint64_t) RTTimeSystemMilliTS(void) 157 157 { 158 return rtTimeGetSystemNanoTS() / 1000000;158 return rtTimeGetSystemNanoTS() / RT_NS_1MS; 159 159 } 160 160
Note:
See TracChangeset
for help on using the changeset viewer.