<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/refs.calendar.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'en',
  ),
  'this' => 
  array (
    0 => 'book.hrtime.php',
    1 => 'HRTime',
    2 => 'High resolution timing',
  ),
  'up' => 
  array (
    0 => 'refs.calendar.php',
    1 => 'Date and Time Related Extensions',
  ),
  'prev' => 
  array (
    0 => 'class.datemalformedstringexception.php',
    1 => 'DateMalformedStringException',
  ),
  'next' => 
  array (
    0 => 'hrtime.setup.php',
    1 => 'Installing/Configuring',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/hrtime/book.xml',
  ),
  'history' => 
  array (
  ),
  'extra_header_links' => 
  array (
    'rel' => 'alternate',
    'href' => '/manual/en/feeds/book.hrtime.atom',
    'type' => 'application/atom+xml',
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="book.hrtime" class="book">
 
 <h1 class="title">High resolution timing</h1>
 

 <div id="intro.hrtime" class="preface">
  <h1 class="title">Introduction</h1>
  <p class="simpara">
The HRTime extension implements a high resolution StopWatch class. It uses the
best possible APIs on different platforms which brings resolution up to nanoseconds. It also makes possible to implement
a custom stopwatch using low level ticks delivered by the underlying APIs.
  </p>
  <blockquote class="note"><p><strong class="note">Note</strong>: 
   <span class="simpara">
    As of PHP 7.3.0 the related function <span class="function"><a href="function.hrtime.php" class="function">hrtime()</a></span> is part of
    the core.
   </span>
  </p></blockquote>
 </div>

 




 




 




 




 





<ul class="chunklist chunklist_book"><li><a href="hrtime.setup.php">Installing/Configuring</a><ul class="chunklist chunklist_book chunklist_children"><li><a href="hrtime.installation.php">Installation</a></li></ul></li><li><a href="hrtime.examples.php">Examples</a><ul class="chunklist chunklist_book chunklist_children"><li><a href="hrtime.example.basic.php">Basic usage</a></li></ul></li><li><a href="class.hrtime-performancecounter.php">HRTime\PerformanceCounter</a> — The HRTime\PerformanceCounter class<ul class="chunklist chunklist_book chunklist_children"><li><a href="hrtime-performancecounter.getfrequency.php">HRTime\PerformanceCounter::getFrequency</a> — Timer frequency in ticks per second</li><li><a href="hrtime-performancecounter.getticks.php">HRTime\PerformanceCounter::getTicks</a> — Current ticks from the system</li><li><a href="hrtime-performancecounter.gettickssince.php">HRTime\PerformanceCounter::getTicksSince</a> — Ticks elapsed since the given value</li></ul></li><li><a href="class.hrtime-stopwatch.php">HRTime\StopWatch</a> — The HRTime\StopWatch class<ul class="chunklist chunklist_book chunklist_children"><li><a href="hrtime-stopwatch.getelapsedticks.php">HRTime\StopWatch::getElapsedTicks</a> — Get elapsed ticks for all intervals</li><li><a href="hrtime-stopwatch.getelapsedtime.php">HRTime\StopWatch::getElapsedTime</a> — Get elapsed time for all intervals</li><li><a href="hrtime-stopwatch.getlastelapsedticks.php">HRTime\StopWatch::getLastElapsedTicks</a> — Get elapsed ticks for the last interval</li><li><a href="hrtime-stopwatch.getlastelapsedtime.php">HRTime\StopWatch::getLastElapsedTime</a> — Get elapsed time for the last interval</li><li><a href="hrtime-stopwatch.isrunning.php">HRTime\StopWatch::isRunning</a> — Whether the measurement is running</li><li><a href="hrtime-stopwatch.start.php">HRTime\StopWatch::start</a> — Start time measurement</li><li><a href="hrtime-stopwatch.stop.php">HRTime\StopWatch::stop</a> — Stop time measurement</li></ul></li><li><a href="class.hrtime-unit.php">HRTime\Unit</a> — The HRTime\Unit class</li></ul></div><?php manual_footer($setup); ?>