2011-01-30 Leo Yang <leo.yang@torchmobile.com.cn>

        Reviewed by Daniel Bates.

        Code style issue in JavaScriptCore/wtf/CurrentTime.h
        https://bugs.webkit.org/show_bug.cgi?id=53394

        According to rule #3 at http://webkit.org/coding/coding-style.html,
        This patch fix style issue in CurrentTime.h.

        No functionality change, no new tests.

        * wtf/CurrentTime.h:
        (WTF::currentTimeMS):
        (WTF::getLocalTime):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77087 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 00653b9d
2011-01-30 Leo Yang <leo.yang@torchmobile.com.cn>
Reviewed by Daniel Bates.
Code style issue in JavaScriptCore/wtf/CurrentTime.h
https://bugs.webkit.org/show_bug.cgi?id=53394
According to rule #3 at http://webkit.org/coding/coding-style.html,
This patch fix style issue in CurrentTime.h.
No functionality change, no new tests.
* wtf/CurrentTime.h:
(WTF::currentTimeMS):
(WTF::getLocalTime):
2011-01-30 Benjamin Poulain <ikipou@gmail.com>
Reviewed by Kenneth Rohde Christiansen.
......
......@@ -36,27 +36,27 @@
namespace WTF {
// Returns the current UTC time in seconds, counted from January 1, 1970.
// Precision varies depending on platform but is usually as good or better
// than a millisecond.
double currentTime();
// Returns the current UTC time in seconds, counted from January 1, 1970.
// Precision varies depending on platform but is usually as good or better
// than a millisecond.
double currentTime();
// Same thing, in milliseconds.
inline double currentTimeMS()
{
return currentTime() * 1000.0;
}
// Same thing, in milliseconds.
inline double currentTimeMS()
{
return currentTime() * 1000.0;
}
inline void getLocalTime(const time_t* localTime, struct tm* localTM)
{
#if COMPILER(MSVC7_OR_LOWER) || COMPILER(MINGW) || OS(WINCE)
*localTM = *localtime(localTime);
#elif COMPILER(MSVC)
localtime_s(localTM, localTime);
#else
localtime_r(localTime, localTM);
#endif
}
inline void getLocalTime(const time_t* localTime, struct tm* localTM)
{
#if COMPILER(MSVC7_OR_LOWER) || COMPILER(MINGW) || OS(WINCE)
*localTM = *localtime(localTime);
#elif COMPILER(MSVC)
localtime_s(localTM, localTime);
#else
localtime_r(localTime, localTM);
#endif
}
} // namespace WTF
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment