简单计时器

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

This package is auto-updated.

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


README

延迟程序执行给定的 float $seconds 秒数。

示例用法

$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);

你会看到

double(0.1)