You have been redirected from an outdated version of the article. Below is the content available on this topic. To view the old article click here.

timer()

Usage

timer(name, action)

Description
This method can be used to measure the performance of sections of code. The action can be start to create a new timer or get to retrieve the elapsed (in milliseconds) time since the start of the timer.

Note: Using the start action on an already existing timer overwrites the timer.

Example

${timer('benchmark', 'start')}
[...]
${log(timer('benchmark', 'get'), 'ms since timer started')}

Search results for "timer()"

timer()

This method can be used to measure the performance of sections of code. The action parameter can be start to create a new timer or get to retrieve the elapsed time (in milliseconds) since the start of the timer.

timer(name, action)