m0r0z0vd / st
Simple timer
Installs: 4
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/m0r0z0vd/st
Requires
- phpunit/phpunit: ^8.5
This package is auto-updated.
Last update: 2025-10-22 08:21:42 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)