• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

tests/H03-May-2022-565475

CREDITSH A D05-Jan-201721 32

LICENSEH A D05-Jan-20171.3 KiB2722

README.mdH A D05-Jan-2017616 2416

config.m4H A D05-Jan-2017359 1410

config.w32H A D05-Jan-2017155 106

hrtime.cH A D05-Jan-201712.5 KiB501323

php_hrtime.hH A D05-Jan-20173.3 KiB12365

timer.cH A D05-Jan-20173.8 KiB175121

timer.hH A D05-Jan-20172.3 KiB8328

README.md

1# High resolution timer for PHP #
2
3This PHP extension brings the possibility to use a high resolution timer from the user land PHP scripts. The best available APIs are used on differend platforms to achieve this goal.
4
5## Synopsis ##
6
7```php
8
9	$c = new HRTime\StopWatch;
10
11	$c->start();
12	/* do some interesting stuff*/
13	$c->stop();
14	$elapsed0 = $c->getLastElapsedTime(HRTime\Unit::NANOSECOND);
15
16	/* do something else */
17
18	$c->start();
19	/* do some interesting stuff again */
20	$c->stop();
21	$elapsed1 = $c->getLastElapsedTime(HRTime\Unit::NANOSECOND);
22
23	$elapsed_total = $c->getElapsedTime(HRTime\Unit::NANOSECOND);
24```