MCPcopy Create free account
hub / github.com/ampproject/amphtml / constructor

Method constructor

src/service/timer-impl.js:20–33  ·  view source on GitHub ↗

* @param {!Window} win

(win)

Source from the content-addressed store, hash-verified

18 * @param {!Window} win
19 */
20 constructor(win) {
21 /** @const {!Window} */
22 this.win = win;
23
24 /** @private @const {!Promise} */
25 this.resolved_ = this.win.Promise.resolve();
26
27 this.taskCount_ = 0;
28
29 this.canceled_ = {};
30
31 /** @const {number} */
32 this.startTime_ = Date.now();
33 }
34
35 /**
36 * Returns time since start in milliseconds.

Callers

nothing calls this directly

Calls 2

resolveMethod · 0.80
nowMethod · 0.80

Tested by

no test coverage detected