Timer implements IVolumeTimeLimit
Disk timer class.
Table of Contents
Interfaces
Constants
- MAX_EXECUTION_TIME = 30
Methods
- __construct() : mixed
- checkTimeEnd() : bool
- Checks timer for time limitation.
- getTimeLimit() : int
- Gets limitation time in seconds.
- hasTimeLimitReached() : bool
- Tells true if time limit reached.
- setTimeLimit() : static
- Sets limitation time in seconds.
- startTimer() : void
- Sets start up time.
Constants
MAX_EXECUTION_TIME
public
mixed
MAX_EXECUTION_TIME
= 30
Tags
Methods
__construct()
public
__construct([int $timeLimit = -1 ]) : mixed
Parameters
- $timeLimit : int = -1
-
Timeout in seconds.
checkTimeEnd()
Checks timer for time limitation.
public
checkTimeEnd() : bool
Return values
boolgetTimeLimit()
Gets limitation time in seconds.
public
getTimeLimit() : int
Return values
inthasTimeLimitReached()
Tells true if time limit reached.
public
hasTimeLimitReached() : bool
Return values
boolsetTimeLimit()
Sets limitation time in seconds.
public
setTimeLimit(int $timeLimit) : static
Parameters
- $timeLimit : int
-
Timeout in seconds.
Return values
staticstartTimer()
Sets start up time.
public
startTimer([float $startTimestamp = 0 ]) : void
Parameters
- $startTimestamp : float = 0
-
Start timestamp.