Changeset 88745 in webkit


Ignore:
Timestamp:
Jun 13, 2011 6:13:56 PM (13 years ago)
Author:
simonjam@chromium.org
Message:

2011-06-13 James Simonsen <simonjam@chromium.org>

Reviewed by James Robinson.

[Chromium] Implement monotonicallyIncreasingClock()
https://bugs.webkit.org/show_bug.cgi?id=62162

  • platform/chromium/PlatformBridge.h:
  • platform/chromium/SystemTimeChromium.cpp: (WebCore::monotonicallyIncreasingTime): Use Chrome's implementation.

2011-06-13 James Simonsen <simonjam@chromium.org>

Reviewed by James Robinson.

[Chromium] Implement monotonicallyIncreasingClock()
https://bugs.webkit.org/show_bug.cgi?id=62162

  • public/WebKitClient.h: (WebKit::WebKitClient::monotonicallyIncreasingTime): Added.
  • src/PlatformBridge.cpp: (WebCore::PlatformBridge::monotonicallyIncreasingTime): Added.
Location:
trunk/Source
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r88741 r88745  
     12011-06-13  James Simonsen  <simonjam@chromium.org>
     2
     3        Reviewed by James Robinson.
     4
     5        [Chromium] Implement monotonicallyIncreasingClock()
     6        https://bugs.webkit.org/show_bug.cgi?id=62162
     7
     8        * platform/chromium/PlatformBridge.h:
     9        * platform/chromium/SystemTimeChromium.cpp:
     10        (WebCore::monotonicallyIncreasingTime): Use Chrome's implementation.
     11
    1122011-06-13  Steve Block  <steveblock@google.com>
    213
  • trunk/Source/WebCore/platform/chromium/PlatformBridge.h

    r87001 r88745  
    247247    // SystemTime ---------------------------------------------------------
    248248    static double currentTime();
     249    static double monotonicallyIncreasingTime();
    249250
    250251    // Theming ------------------------------------------------------------
  • trunk/Source/WebCore/platform/chromium/SystemTimeChromium.cpp

    r88199 r88745  
    4646double monotonicallyIncreasingTime()
    4747{
    48     static double lastTime = 0;
    49     double currentTimeNow = currentTime();
    50     if (currentTimeNow < lastTime)
    51         return lastTime;
    52     lastTime = currentTimeNow;
    53     return currentTimeNow;
     48    return PlatformBridge::monotonicallyIncreasingTime();
    5449}
    5550
  • trunk/Source/WebKit/chromium/ChangeLog

    r88738 r88745  
     12011-06-13  James Simonsen  <simonjam@chromium.org>
     2
     3        Reviewed by James Robinson.
     4
     5        [Chromium] Implement monotonicallyIncreasingClock()
     6        https://bugs.webkit.org/show_bug.cgi?id=62162
     7
     8        * public/WebKitClient.h:
     9        (WebKit::WebKitClient::monotonicallyIncreasingTime): Added.
     10        * src/PlatformBridge.cpp:
     11        (WebCore::PlatformBridge::monotonicallyIncreasingTime): Added.
     12
    1132011-06-13  Jian Li  <jianli@chromium.org>
    214
  • trunk/Source/WebKit/chromium/public/WebKitClient.h

    r87001 r88745  
    267267    virtual double currentTime() { return 0; }
    268268
     269    // Monotonically increasing time in seconds from an arbitrary fixed point in the past.
     270    // This function is expected to return at least millisecond-precision values. For this reason,
     271    // it is recommended that the fixed point be no further in the past than the epoch.
     272    virtual double monotonicallyIncreasingTime() { return 0; }
     273
    269274    virtual void cryptographicallyRandomValues(unsigned char* buffer, size_t length)
    270275    {
  • trunk/Source/WebKit/chromium/src/PlatformBridge.cpp

    r87728 r88745  
    700700{
    701701    return webKitClient()->currentTime();
     702}
     703
     704double PlatformBridge::monotonicallyIncreasingTime()
     705{
     706    return webKitClient()->monotonicallyIncreasingTime();
    702707}
    703708
Note: See TracChangeset for help on using the changeset viewer.