ClockNanoseconds
in package
A simple wrapper around the high resolution clock to hold a nano second timestamp.
Table of Contents
Properties
- $nanoseconds : int
- $seconds : int
Methods
- __construct() : mixed
- add() : self
- Adds the given amount of nanoseconds to this timestamp.
- add64() : void
- Adds the given amount of nanoseconds as a single 64 bit integer to this timestamp.
- int64() : int
- Returns the current nanoseconds timestamp as a single 64 bit integer.
- sub() : self
- Subtracts the given amount of nanoseconds from this timestamp.
Properties
$nanoseconds
public
int
$nanoseconds
$seconds
public
int
$seconds
Methods
__construct()
public
__construct(int $seconds, int $nanoseconds) : mixed
Parameters
- $seconds : int
- $nanoseconds : int
add()
Adds the given amount of nanoseconds to this timestamp.
public
add(ClockNanoseconds $other) : self
Parameters
- $other : ClockNanoseconds
Return values
selfadd64()
Adds the given amount of nanoseconds as a single 64 bit integer to this timestamp.
public
add64(int $nanoseconds) : void
Parameters
- $nanoseconds : int
int64()
Returns the current nanoseconds timestamp as a single 64 bit integer.
public
int64() : int
Return values
intsub()
Subtracts the given amount of nanoseconds from this timestamp.
public
sub(ClockNanoseconds $other) : self
Parameters
- $other : ClockNanoseconds