time()
Version 1.x
time()
creates a named timer using a standard console
interface:
console.time(name)
and console.timeEnd(name)
.
It can be included with following commands:
1 2 3 4 5 6 7 8 9 10 11 12 13 |
|
Description
The result value of time
module is a function, which takes a string parameter
name
, and returns an advice object, which can be used directly
with dcl.advise() or advise().
The advice prints on console when a method was invoked, and when it finished. Recursive calls are allowed, but only first invocation is printed.
If name
is not specified, a unique name is generated.
Examples
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
|
The example above will print something like that:
1
|
|