Make sure we never set a timer for before "now" when given a positive

delay.  Bug 124103, r=pavlov, sr=brendan


git-svn-id: svn://10.0.0.236/trunk@114086 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bzbarsky%mit.edu 2002-02-08 23:45:26 +00:00
parent d8e36399db
commit 935007ecaa

View File

@ -344,6 +344,10 @@ void nsTimerImpl::SetDelayInternal(PRUint32 aDelay)
mTimeout = now + PR_MillisecondsToInterval(mDelay);
if (mTimeout < now) { // we overflowed
mTimeout = PRIntervalTime(-1);
}
#ifdef DEBUG_TIMERS
if (PR_LOG_TEST(gTimerLog, PR_LOG_DEBUG)) {
if (mStart == 0)