Documentation

Duration
in package

FinalYes
Tags
psalm-immutable
no-named-arguments

Parameter names are not covered by the backward compatibility promise for PHPUnit

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

Methods

asFloat()

public asFloat() : float
Return values
float

asString()

public asString() : string
Return values
string

equals()

public equals(self $other) : bool
Parameters
$other : self
Return values
bool

fromSecondsAndNanoseconds()

public static fromSecondsAndNanoseconds(int $seconds, int $nanoseconds) : self
Parameters
$seconds : int
$nanoseconds : int
Tags
throws
InvalidArgumentException
Return values
self

isGreaterThan()

public isGreaterThan(self $other) : bool
Parameters
$other : self
Return values
bool

isLessThan()

public isLessThan(self $other) : bool
Parameters
$other : self
Return values
bool

nanoseconds()

public nanoseconds() : int
Return values
int

seconds()

public seconds() : int
Return values
int

        
On this page

Search results