Simple timer

Maintainers

Details

github.com/m0r0z0vd/st

Source

Issues

Installs: 4

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/m0r0z0vd/st

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

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)