Class - XPSPL\idle\Time

Idles the processor for a specific amount of time.

The amount of time can be specified in seconds or milliseconds.

Methods

__construct

__construct($time, $instruction)

Constructs the time idle.

idle

idle($processor)

Runs the idle function, this will call either sleep or usleep depending upon the type.

Return type:void

get_length

get_length()

Returns the length of time to idle.

Return type:integer

get_time_until

get_time_until()

Returns the length of time to idle until.

Return type:integer

get_instruction

get_instruction()

Returns the type of time.

Return type:integer

get_time_left

get_time_left()

Returns the amount of time left until the idle should stop.

Return type:integer|float

convert_length

convert_length($length, $to)

Converts length of times from and to seconds, milliseconds and microseconds.

Parameters:
  • integer|float
  • integer – To instruction
Return type:

integer|float

has_time_passed

has_time_passed()

Determines if the time to idle until has passed.

Return type:boolean

override

override($time)

Determine if the given time idle function is less than the current.

Parameters:object – Time idle object
Return type:boolean

Last updated on 02/01/13 07:27am

Project Versions

Table Of Contents

Previous topic

Class - XPSPL\idle\Process

Next topic

Class - XPSPL\processor\SIG_Shutdown

This Page