Changeset 50608 in webkit for trunk/JavaScriptCore/wtf/CurrentTime.h
- Timestamp:
- Nov 6, 2009, 3:33:17 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/wtf/CurrentTime.h
r42851 r50608 35 35 namespace WTF { 36 36 37 // Returns the current system (UTC) time in seconds, startingJanuary 1, 1970.38 // Precision varies depending on a platform but usually isas good or better37 // Returns the current UTC time in seconds, counted from January 1, 1970. 38 // Precision varies depending on platform but is usually as good or better 39 39 // than a millisecond. 40 40 double currentTime(); 41 42 // Same thing, in milliseconds. 43 inline double currentTimeMS() 44 { 45 return currentTime() * 1000.0; 46 } 47 48 inline void getLocalTime(const time_t* localTime, struct tm* localTM) 49 { 50 #if COMPILER(MSVC7) || COMPILER(MINGW) || PLATFORM(WINCE) 51 *localTM = *localtime(localTime); 52 #elif COMPILER(MSVC) 53 localtime_s(localTM, localTime); 54 #else 55 localtime_r(localTime, localTM); 56 #endif 57 } 41 58 42 59 } // namespace WTF
Note:
See TracChangeset
for help on using the changeset viewer.