|
| __construct (?int $starttime=null,) |
| Create a new instance of the incrementing 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.
|
|
|
int int | $time |
| The next time of the clock.
|
|
◆ __construct()
incrementing_clock::__construct |
( |
?int | $starttime = null | ) |
|
Create a new instance of the incrementing clock.
- Parameters
-
null | int | $starttime | The initial time to use. If not specified, the current time is used. |
◆ bump()
incrementing_clock::bump |
( |
int | $seconds = 1 | ) |
|
Bump the time by a number of seconds.
Note: The act of fetching the time will also bump the time by one second.
- Parameters
-
◆ now()
incrementing_clock::now |
( |
| ) |
|
◆ set_to()
incrementing_clock::set_to |
( |
int | $time | ) |
|
Set the time of the clock.
- Parameters
-
◆ time()
incrementing_clock::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/incrementing_clock.php