Timer
Timer class.
Table of Contents
Methods
- __construct() : mixed
- getTimeLimit() : int
- Gets limitation time in seconds.
- hasTimeLimitReached() : bool
- Tells true if time limit reached.
- setTimeLimit() : self
- Sets limitation time in seconds.
- startTimer() : self
- Start up timer.
Methods
__construct()
public
__construct([int $timeLimit = -1 ]) : mixed
Parameters
- $timeLimit : int = -1
-
Timeout in seconds.
getTimeLimit()
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) : self
Parameters
- $timeLimit : int
-
Timeout in seconds.
Return values
selfstartTimer()
Start up timer.
public
startTimer([int $startingTime = null ]) : self
Parameters
- $startingTime : int = null
-
Starting time.