[Webkit-unassigned] [Bug 93763] WTF::monotonicallyIncreasingTime() compiled wrong by GCC 4.2

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Aug 13 01:48:28 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=93763





--- Comment #1 from Tobias Netzel <tobias.netzel at googlemail.com>  2012-08-13 01:48:58 PST ---
Thinking it over maybe monotonicallyIncreasingTime() should indicate whether a overflow happened, i.e like this (just an idea):

double monotonicallyIncreasingTime(bool *overflow)
{
    static double previousTime = std::numeric_limits<float>::quiet_NaN();
    double result = 0.0;
    if (previousTime != previousTime) {
        previousTime = monotonicallyIncreasingTime();
    }
    result = monotonicallyIncreasingTime();
    if (overflow)
        *overflow = (result < previousTime)
    return result;
}

That way any places that need to know when an overflow has just happened can use monotonicallyIncreasingTime(bool *), for example WebCore::ThreadTimers::sharedTimerFiredInternal().

On the other hand, will the OS ever be running that much time (is it even possible?) for the timer to overflow?

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list