PHP Class Jyxo\Timer

Author: Štěpán Svoboda
Author: Matěj Humpál
Afficher le fichier Open project: jyxo/php Class Usage Examples

Méthodes publiques

Méthode Description
start ( string $name = '' ) : string Starts measuring. Returns timer name.
stop ( string $name ) : float Returns the time difference in seconds.
timer ( ) : float Returns the time form the last function call.

Method Details

start() public static méthode

Starts measuring. Returns timer name.
public static start ( string $name = '' ) : string
$name string Custom timer name
Résultat string

stop() public static méthode

Returns the time difference in seconds.
public static stop ( string $name ) : float
$name string Timer name
Résultat float

timer() public static méthode

In case of first function call, function returns 0.
public static timer ( ) : float
Résultat float