Last active
August 15, 2020 10:19
-
-
Save deepal/73655c50f60eefd9d6299eee3e0b73f0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DOMTimer::DOMTimer(ExecutionContext* context, PassOwnPtrWillBeRawPtr<ScheduledAction> action, int interval, bool singleShot, int timeoutID) | |
: SuspendableTimer(context) | |
, m_timeoutID(timeoutID) | |
, m_nestingLevel(context->timers()->timerNestingLevel() + 1) | |
, m_action(action) | |
{ | |
// ... redacted ... | |
double intervalMilliseconds = std::max(oneMillisecond, interval * oneMillisecond); | |
if (intervalMilliseconds < minimumInterval && m_nestingLevel >= maxTimerNestingLevel) | |
intervalMilliseconds = minimumInterval; | |
if (singleShot) | |
startOneShot(intervalMilliseconds, FROM_HERE); | |
else | |
startRepeating(intervalMilliseconds, FROM_HERE); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment