interface TimerInterface

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

Methods

void
start()

Starts the timer.

void
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 19
void start()

Starts the timer.

Return Value

void

at line 26
void stop()

Stops the timer.

Return Value

void

at line 33
bool isRunning()

Returns true if the timer is currently running.

Return Value

bool

at line 42
float|null getDuration()

Returns the time (in seconds) the timer ran.

Returns null if no time has been recorded.

Return Value

float|null