interface TimerInterface

The TimerInterface is used to record the duration of requests against Contentful's API.

Methods

start()

Starts the timer.

stop()

Stops the timer.

bool
isRunning()

Returns true if the timer is currently running.

float|null
getDuration()

Returns the time (in seconds) the timer ran.

Details

at line 20
start()

Starts the timer.

at line 25
stop()

Stops the timer.

at line 32
bool isRunning()

Returns true if the timer is currently running.

Return Value

bool

at line 41
float|null getDuration()

Returns the time (in seconds) the timer ran.

Returns null if no time has been recorded.

Return Value

float|null