ANTAREX API

Clava API

LARA API

LARA Common Language API

(.js)
laraImport("lara.code.Timer");

(.lara)
import lara.code.Timer;

Timer

Constructor

Timer

new Timer(unit, filename)

Timer object, for timing sections of code.

Parameters

unit: any
filename: any

Instance Members

addedDefines

addedDefines

getAfterJp

getAfterJp()

Returns

any - the last join point that was inserted after the $end mark

getUnit

getUnit()

setPrint

setPrint(print)

Parameters

print: any

setPrintUnit

setPrintUnit(printUnit)

Parameters

printUnit: any - boolean

time

time($start, prefix, $end)

Times the code of a given section.

Parameters

$start: any - [Mandatory] Starting point of the time measure
prefix: any - Message that will appear before the time measure. If undefined, empty string will be used.
$end: any - Ending point of the time measure. If undefined, measure is done around starting point.

time

time($start, prefix, $end)

Times the code of a given section.

Parameters

$start: any - [Mandatory] Starting point of the time measure
prefix: any - Message that will appear before the time measure. If undefined, empty string will be used.
$end: any - Ending point of the time measure. If undefined, measure is done around starting point.

Returns

any - name of the variable that contains the value of the elapsed time.