()
| 20 | let lastUpdate = clock.now() |
| 21 | |
| 22 | const onChange = (): void => { |
| 23 | const now = clock.now() |
| 24 | if (now - lastUpdate >= intervalMs) { |
| 25 | lastUpdate = now |
| 26 | setTime(now) |
| 27 | } |
| 28 | } |
| 29 | |
| 30 | return clock.subscribe(onChange, false) |
| 31 | }, [clock, intervalMs]) |
no outgoing calls
no test coverage detected