Duration
in package
FinalYes
Tags
Table of Contents
Properties
- $nanoseconds : int
- $seconds : int
Methods
- asFloat() : float
- asString() : string
- equals() : bool
- fromSecondsAndNanoseconds() : self
- isGreaterThan() : bool
- isLessThan() : bool
- nanoseconds() : int
- seconds() : int
- __construct() : mixed
- ensureNanoSecondsInRange() : void
- ensureNotNegative() : void
Properties
$nanoseconds read-only
private
int
$nanoseconds
$seconds read-only
private
int
$seconds
Methods
asFloat()
public
asFloat() : float
Return values
floatasString()
public
asString() : string
Return values
stringequals()
public
equals(self $other) : bool
Parameters
- $other : self
Return values
boolfromSecondsAndNanoseconds()
public
static fromSecondsAndNanoseconds(int $seconds, int $nanoseconds) : self
Parameters
- $seconds : int
- $nanoseconds : int
Tags
Return values
selfisGreaterThan()
public
isGreaterThan(self $other) : bool
Parameters
- $other : self
Return values
boolisLessThan()
public
isLessThan(self $other) : bool
Parameters
- $other : self
Return values
boolnanoseconds()
public
nanoseconds() : int
Return values
intseconds()
public
seconds() : int
Return values
int__construct()
private
__construct(int $seconds, int $nanoseconds) : mixed
Parameters
- $seconds : int
- $nanoseconds : int
Tags
ensureNanoSecondsInRange()
private
ensureNanoSecondsInRange(int $nanoseconds) : void
Parameters
- $nanoseconds : int
Tags
ensureNotNegative()
private
ensureNotNegative(int $value, string $type) : void
Parameters
- $value : int
- $type : string