Skip to content

m0r0z0vd/st

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple timer

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)