move to setFixedTime

This commit is contained in:
Simon Knott 2024-10-07 07:16:42 +02:00
parent a0125c8965
commit 161070bc1b
No known key found for this signature in database
GPG key ID: 8CEDC00028084AEC

View file

@ -193,6 +193,8 @@ Resumes timers. Once this method is called, time resumes flowing, timers are fir
Makes `Date.now` and `new Date()` return fixed fake time at all times,
keeps all the timers running.
Use this method for simple scenarios where you only need to test with a predefined time. For more advanced scenarios, use [`method: Clock.install`] instead. Read docs on [clock emulation](../clock.md) to learn more.
**Usage**
```js
@ -251,8 +253,6 @@ Time to be set.
Sets system time, but does not trigger any timers. Use this to test how the web page reacts to a time shift, for example switching from summer to winter time, or changing time zones.
Use this method for simple scenarios where you only need to test with a predefined time. For more advanced scenarios, use [`method: Clock.install`] instead. Read docs on [clock emulation](../clock.md) to learn more.
**Usage**
```js