Simple timer

v1.0 2020-05-21 20:50 UTC

This package is auto-updated.

Last update: 2024-09-22 06:00:14 UTC


README

Delays the program execution for the given number of float $seconds.

Example usage

$timer = new SimpleTimer();
$startTime = microtime(true);
$timer->wait(0.1); // will do sleep for 100 ms
$endTime = microtime(true);
$diff = round($endTime - $startTime, 2);
var_dump($diff);

You will see:

double(0.1)