MonotonicClock
in package
implements
ClockInterface
FinalYes
A monotonic clock suitable for performance profiling.
Tags
Table of Contents
Interfaces
Properties
Methods
- __construct() : mixed
- now() : DatePoint
- Returns the current time as a DateTimeImmutable Object
- sleep() : void
- withTimeZone() : static
Properties
$sOffset
private
int
$sOffset
$timezone
private
DateTimeZone
$timezone
$usOffset
private
int
$usOffset
Methods
__construct()
public
__construct([DateTimeZone|string|null $timezone = null ]) : mixed
Parameters
- $timezone : DateTimeZone|string|null = null
Tags
now()
Returns the current time as a DateTimeImmutable Object
public
now() : DatePoint
Return values
DatePointsleep()
public
sleep(float|int $seconds) : void
Parameters
- $seconds : float|int
withTimeZone()
public
withTimeZone(DateTimeZone|string $timezone) : static
Parameters
- $timezone : DateTimeZone|string