|
| __construct (?int $time=null,) |
| Create a new instance of the frozen clock.
|
|
| bump (int $seconds=1) |
| Bump the time by a number of seconds.
|
|
| now () |
|
| set_to (int $time) |
| Set the time of the clock.
|
|
| time () |
| Return the unix time stamp for the current representation of the time.
|
|
|
DateTimeImmutable DateTimeImmutable | $time |
| The next time of the clock.
|
|
◆ __construct()
frozen_clock::__construct |
( |
?int | $time = null | ) |
|
Create a new instance of the frozen clock.
- Parameters
-
null | int | $time | The initial time to use. If not specified, the current time is used. |
◆ bump()
frozen_clock::bump |
( |
int | $seconds = 1 | ) |
|
Bump the time by a number of seconds.
- Parameters
-
◆ now()
◆ set_to()
frozen_clock::set_to |
( |
int | $time | ) |
|
Set the time of the clock.
- Parameters
-
◆ time()
Return the unix time stamp for the current representation of the time.
- Return values
-
Implements core\clock.
The documentation for this class was generated from the following file:
- lib/testing/classes/frozen_clock.php