Debug::saveTimer() method

Save the current time of the given timer which can be later retrieved with getSavedTimer($key)

Note this also stops/removes the timer.

Usage

// basic usage
$bool = Debug::saveTimer(string $key);

// usage with all arguments
$bool = Debug::saveTimer(string $key, string $note = '');

Arguments

NameType(s)Description
keystring
note (optional)string

Optional note to include in getSavedTimer

Return value

bool string

Returns elapsed time, or false if timer didn't exist


Debug methods and properties

API reference based on ProcessWire core version 3.0.244

“Indeed, if ProcessWire can be considered as a CMS in its own right, it also offers all the advantages of a CMF (Content Management Framework). Unlike other solutions, the programmer is not forced to follow the proposed model and can integrate his/her ways of doing things.” —Guy Verville, Spiria Digital Inc.