PHP Class Kraken\Loop\Timer\TimerBox

Show file Open project: kraken-php/framework Class Usage Examples

Protected Properties

Property Type Description
$scheduler SplPriorityQueue
$time float
$timers SplObjectStorage

Public Methods

Method Description
__construct ( )
add ( Kraken\Loop\Timer\TimerInterface $timer )
contains ( Kraken\Loop\Timer\TimerInterface $timer ) : boolean
getFirst ( ) : Kraken\Loop\Timer\TimerInterface | null
getTime ( ) : mixed
isEmpty ( ) : boolean
remove ( Kraken\Loop\Timer\TimerInterface $timer )
tick ( )
updateTime ( ) : float

Method Details

__construct() public method

public __construct ( )

add() public method

public add ( Kraken\Loop\Timer\TimerInterface $timer )
$timer Kraken\Loop\Timer\TimerInterface

contains() public method

public contains ( Kraken\Loop\Timer\TimerInterface $timer ) : boolean
$timer Kraken\Loop\Timer\TimerInterface
return boolean

getFirst() public method

public getFirst ( ) : Kraken\Loop\Timer\TimerInterface | null
return Kraken\Loop\Timer\TimerInterface | null

getTime() public method

public getTime ( ) : mixed
return mixed

isEmpty() public method

public isEmpty ( ) : boolean
return boolean

remove() public method

public remove ( Kraken\Loop\Timer\TimerInterface $timer )
$timer Kraken\Loop\Timer\TimerInterface

tick() public method

public tick ( )

updateTime() public method

public updateTime ( ) : float
return float

Property Details

$scheduler protected property

protected SplPriorityQueue $scheduler
return SplPriorityQueue

$time protected property

protected float $time
return float

$timers protected property

protected SplObjectStorage $timers
return SplObjectStorage