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')}