High resolution timing

Table of Contents

The HRTime\PerformanceCounter class

Introduction

Class synopsis

HRTime\PerformanceCounter
class HRTime\PerformanceCounter {
/* Methods */
public static int getFrequency ( void )
public static int getTicks ( void )
public static int getTicksSince ( integer $start )
}

The HRTime\StopWatch class

Introduction

Class synopsis

HRTime\StopWatch
class HRTime\StopWatch extends HRTime\PerformanceCounter {
/* Methods */
public int getElapsedTicks ( void )
public float getElapsedTime ([ integer $unit ] )
public int getLastElapsedTicks ( void )
public float getLastElapsedTime ([ integer $unit ] )
public bool isRunning ( void )
public void start ( void )
public void stop ( void )
/* Inherited methods */
public static int HRTime\PerformanceCounter::getFrequency ( void )
public static int HRTime\PerformanceCounter::getTicks ( void )
public static int HRTime\PerformanceCounter::getTicksSince ( integer $start )
}

The HRTime\Unit class

Introduction

Class synopsis

HRTime\Unit
class HRTime\Unit {
/* Constants */
const integer HRTime\Unit::SECOND = 0 ;
const integer HRTime\Unit::MILLISECOND = 1 ;
const integer HRTime\Unit::MICROSECOND = 2 ;
const integer HRTime\Unit::NANOSECOND = 3 ;
/* Methods */
}

Predefined Constants

HRTime\Unit::SECOND

HRTime\Unit::MILLISECOND

HRTime\Unit::MICROSECOND

HRTime\Unit::NANOSECOND