\AKCoreTimer
Timer class
Synopsis
class AKCoreTimer
extends AKAbstractObject
{
- // members
- private $max_exec_time;
- private $start_time;
- // Inherited members from AKAbstractObject
- protected $_errors_queue_size;
- protected $_warnings_queue_size;
- // methods
- public AECoreTimer __construct()
- public void __wakeup()
- public float getTimeLeft()
- public float getRunningTime()
- private void microtime_float()
- public void enforce_min_exec_time()
- public void resetTime()
- // Inherited methods from AKAbstractObject
- public void __construct()
- public string getError()
- public array getErrors()
- public void setError()
- public void resetErrors()
- public string getWarning()
- public array getWarnings()
- public void setWarning()
- public void resetWarnings()
- public void propagateToObject()
- public void propagateFromObject()
- protected void setErrorsQueueSize()
- protected void setWarningsQueueSize()
Hierarchy
Extends
Members
private
- $max_exec_time — int
- $start_time — int
protected
- $_errors_queue_size — array
- $_warnings_queue_size — array
Methods
private
- microtime_float() — Returns the current timestampt in decimal seconds
public
- __construct() — Public constructor, creates the timer object and calculates the execution time limits
- __wakeup() — Wake-up function to reset internal timer when we get unserialized
- enforce_min_exec_time() — Enforce the minimum execution time
- getRunningTime() — Gets the time elapsed since object creation/unserialization, effectively how long Akeeba Engine has been processing data
- getTimeLeft() — Gets the number of seconds left, before we hit the "must break" threshold
- resetTime() — Reset the timer. It should only be used in CLI mode!
Inherited from AKAbstractObject
protected
- setErrorsQueueSize() — Sets the size of the error queue (acts like a LIFO buffer)
- setWarningsQueueSize() — Sets the size of the warnings queue (acts like a LIFO buffer)
public
- getError() — Get the most recent error message
- getErrors() — Return all errors, if any
- getWarning() — Get the most recent warning message
- getWarnings() — Return all warnings, if any
- propagateFromObject() — Propagates errors and warnings from a foreign object. Each propagated list is then cleared on the foreign object, as long as it implements resetErrors() and/or resetWarnings() methods.
- propagateToObject() — Propagates errors and warnings to a foreign object. The foreign object SHOULD implement the setError() and/or setWarning() methods but DOESN'T HAVE TO be of AKAbstractObject type. For example, this can even be used to propagate to a JObject instance in Joomla!. Propagated items will be removed from ourself.
- resetErrors() — Resets all error messages
- resetWarnings() — Resets all warning messages
- setError() — Add an error message
- setWarning() — Add an error message