Index Documentation

Stopwatch
in package

Provides a means to measure elapsed time at a high resolution.

Table of Contents

Methods

__construct()  : mixed
getElapsedTicks()  : int|float
Gets the number of ticks that have elapsed.
getElapsedTime()  : float
Gets the number of elapsed milliseconds.
isRunning()  : bool
Checks whether the Stopwatch is currently running.
start()  : void
startNew()  : Stopwatch
Creates a new Stopwatch instance and starts measuring time.
stop()  : void

Methods

getElapsedTicks()

Gets the number of ticks that have elapsed.

public getElapsedTicks() : int|float
Return values
int|float

Number of ticks.

getElapsedTime()

Gets the number of elapsed milliseconds.

public getElapsedTime() : float
Return values
float

Number of elapsed milliseconds.

isRunning()

Checks whether the Stopwatch is currently running.

public isRunning() : bool
Return values
bool

true if the Stopwatch is running, false if not.

startNew()

Creates a new Stopwatch instance and starts measuring time.

public static startNew() : Stopwatch
Return values
Stopwatch

Newly created running Stopwatch.


        
On this page

Search results