1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
6 * @fileoverview Provides an interface representing the browser/extension
7 * system's timer interface.
12 * An interface representing the browser/extension system's timer interface.
15 function SystemTimer() {}
18 * Sets a single-shot timer.
19 * @param {function()} func Called back when the timer expires.
20 * @param {number} timeoutMillis How long until the timer fires, in
22 * @return {number} A timeout ID, which can be used to cancel the timer.
24 SystemTimer.prototype.setTimeout = function(func, timeoutMillis) {};
27 * Clears a previously set timer.
28 * @param {number} timeoutId The ID of the timer to clear.
30 SystemTimer.prototype.clearTimeout = function(timeoutId) {};
33 * Sets a repeating interval timer.
34 * @param {function()} func Called back each time the timer fires.
35 * @param {number} timeoutMillis How long until the timer fires, in
37 * @return {number} A timeout ID, which can be used to cancel the timer.
39 SystemTimer.prototype.setInterval = function(func, timeoutMillis) {};
42 * Clears a previously set interval timer.
43 * @param {number} timeoutId The ID of the timer to clear.
45 SystemTimer.prototype.clearInterval = function(timeoutId) {};