PHP Class Time\SIG_Awake

Send a signal to awake once a length of time has passed. Instructions are those defined as TIME_SECONDS, TIME_MILLISECONDS, TIME_MICROSECONDS.
Inheritance: extends XPSPL\SIG_Routine
Show file Open project: prggmr/xpspl

Protected Properties

Property Type Description
$_instruction Time instruction.
$_time Time to awake in.

Public Methods

Method Description
__construct ( integer $time, $instruction = TIME_SECONDS ) : void Constructs a awake signal.
__toString ( ) : string String representation.
get_time ( ) : integer Returns the time for the signal.
routine ( Routine $routine = null ) : boolean Runs the routine.

Method Details

__construct() public method

Constructs a awake signal.
public __construct ( integer $time, $instruction = TIME_SECONDS ) : void
$time integer Amount of time before emitting the signal.
return void

__toString() public method

String representation.
public __toString ( ) : string
return string

get_time() public method

Returns the time for the signal.
public get_time ( ) : integer
return integer

routine() public method

This checks if the appriorate amount of time has passed and emits the awake signal if so.
public routine ( Routine $routine = null ) : boolean
$routine XPSPL\Routine
return boolean

Property Details

$_instruction protected property

Time instruction.
protected $_instruction

$_time protected property

Time to awake in.
protected $_time