[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.19-706-ge5415e9

eric at webkit.org eric at webkit.org
Thu Feb 4 21:35:57 UTC 2010


The following commit has been merged in the webkit-1.1 branch:
commit 6e2eb8c0dfbd1ad85be20134f7440d58eb1e962f
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