()
| 47 | }; |
| 48 | }, |
| 49 | now() { |
| 50 | if (startTime === 0) { |
| 51 | startTime = Date.now(); |
| 52 | } |
| 53 | // When the clock interval is running, return the synchronized tickTime |
| 54 | // so all subscribers in the same tick see the same value. |
| 55 | // When paused (no keepAlive subscribers), return real-time to avoid |
| 56 | // returning a stale tickTime from the last tick before the pause. |
| 57 | if (interval && tickTime) { |
| 58 | return tickTime; |
| 59 | } |
| 60 | return Date.now() - startTime; |
| 61 | }, |
| 62 | setTickInterval(ms) { |
| 63 | if (ms === currentTickIntervalMs) return; |
| 64 | currentTickIntervalMs = ms; |
no outgoing calls
no test coverage detected