[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373
eric at webkit.org
eric at webkit.org
Thu Apr 8 01:34:11 UTC 2010
The following commit has been merged in the webkit-1.2 branch:
commit d31c62ce7c95c2128ba4c117691dcc4adc7f8920
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Feb 2 01:33:52 2010 +0000
2010-02-01 Kwang Yul Seo <skyul at company100.net>
Reviewed by Eric Seidel.
[BREWMP] Port WTF's currentTime
https://bugs.webkit.org/show_bug.cgi?id=33567
Combine GETUTCSECONDS and GETTIMEMS to calculate the number
of milliseconds since 1970/01/01 00:00:00 UTC.
* wtf/CurrentTime.cpp:
(WTF::currentTime):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54183 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index 2273e51..95bb706 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,3 +1,16 @@
+2010-02-01 Kwang Yul Seo <skyul at company100.net>
+
+ Reviewed by Eric Seidel.
+
+ [BREWMP] Port WTF's currentTime
+ https://bugs.webkit.org/show_bug.cgi?id=33567
+
+ Combine GETUTCSECONDS and GETTIMEMS to calculate the number
+ of milliseconds since 1970/01/01 00:00:00 UTC.
+
+ * wtf/CurrentTime.cpp:
+ (WTF::currentTime):
+
2010-02-01 Patrick Gansterer <paroga at paroga.com>
Reviewed by Darin Adler.
diff --git a/JavaScriptCore/wtf/CurrentTime.cpp b/JavaScriptCore/wtf/CurrentTime.cpp
index b272874..30ca7c3 100644
--- a/JavaScriptCore/wtf/CurrentTime.cpp
+++ b/JavaScriptCore/wtf/CurrentTime.cpp
@@ -59,6 +59,8 @@ extern "C" time_t mktime(struct tm *t);
#include <glib.h>
#elif PLATFORM(WX)
#include <wx/datetime.h>
+#elif PLATFORM(BREWMP)
+#include <AEEStdLib.h>
#else // Posix systems relying on the gettimeofday()
#include <sys/time.h>
#endif
@@ -277,6 +279,20 @@ double currentTime()
return (double)now.GetTicks() + (double)(now.GetMillisecond() / 1000.0);
}
+#elif PLATFORM(BREWMP)
+
+// GETUTCSECONDS returns the number of seconds since 1980/01/06 00:00:00 UTC,
+// and GETTIMEMS returns the number of milliseconds that have elapsed since the last
+// occurrence of 00:00:00 local time.
+// We can combine GETUTCSECONDS and GETTIMEMS to calculate the number of milliseconds
+// since 1970/01/01 00:00:00 UTC.
+double currentTime()
+{
+ // diffSeconds is the number of seconds from 1970/01/01 to 1980/01/06
+ const unsigned diffSeconds = 315964800;
+ return static_cast<double>(diffSeconds + GETUTCSECONDS() + ((GETTIMEMS() % 1000) / msPerSecond));
+}
+
#else // Other Posix systems rely on the gettimeofday().
double currentTime()
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list