Index Documentation

Stopwatch
in package

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

Table of Contents

Methods

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

Methods

getElapsedTicks()

Gets the number of ticks that have elapsed.

public getElapsedTicks() : int
Return values
int

Number of ticks.

getElapsedTime()

Gets the number of elapsed milliseconds.

public getElapsedTime() : int|float
Return values
int|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.

start()

Start time measurement.

public start() : void

startNew()

Creates a new Stopwatch instance and starts measuring time.

public static startNew() : Stopwatch
Return values
Stopwatch

Newly created running Stopwatch.

stop()

Stop time measurement.

public stop() : void

        
On this page

Search results