PHP 클래스 FOF30\Timer\Timer

파일 보기 프로젝트 열기: akeeba/fof 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( integer $max_exec_time = 5, integer $runtime_bias = 75 ) : Timer Public constructor, creates the timer object and calculates the execution time limits.
__wakeup ( ) : void Wake-up function to reset internal timer when we get unserialized
getRunningTime ( ) : float Gets the time elapsed since object creation/unserialization, effectively how long this step is running
getTimeLeft ( ) : float Gets the number of seconds left, before we hit the "must break" threshold
resetTime ( ) : void Reset the timer

메소드 상세

__construct() 공개 메소드

Public constructor, creates the timer object and calculates the execution time limits.
public __construct ( integer $max_exec_time = 5, integer $runtime_bias = 75 ) : Timer
$max_exec_time integer Maximum execution time, in seconds
$runtime_bias integer Runtime bias factor, as percent points of the max execution time
리턴 Timer

__wakeup() 공개 메소드

Wake-up function to reset internal timer when we get unserialized
public __wakeup ( ) : void
리턴 void

getRunningTime() 공개 메소드

Gets the time elapsed since object creation/unserialization, effectively how long this step is running
public getRunningTime ( ) : float
리턴 float

getTimeLeft() 공개 메소드

Gets the number of seconds left, before we hit the "must break" threshold
public getTimeLeft ( ) : float
리턴 float

resetTime() 공개 메소드

Reset the timer
public resetTime ( ) : void
리턴 void