Ignore:
Timestamp:
Nov 6, 2009, 3:33:17 PM (16 years ago)
Author:
[email protected]
Message:

Rolled back in r50590 with Windows build hopefully fixed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/wtf/CurrentTime.h

    r42851 r50608  
    3535namespace WTF {
    3636
    37     // Returns the current system (UTC) time in seconds, starting January 1, 1970.
    38     // Precision varies depending on a platform but usually is as good or better
     37    // 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
    3939    // than a millisecond.
    4040    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    }
    4158
    4259} // namespace WTF
Note: See TracChangeset for help on using the changeset viewer.