ticks

Synopsis

$ ticks()

obtain the current time in milliseconds

Returns

the number of milliseconds since midnight, January 1, 1970 UTC.

Examples

$start = ticks(); sub fact { return iff($1 == 0, 1, $1 * fact($1 - 1)); } println("100! is: " . fact(100.0)); $time = (ticks() - $start) / 1000.0; println("Calculation took $time seconds");

100! is: 9.33262154439441E157 Calculation took 0.015 seconds

See Also