Getting Started | Documentation | Glish | Learn More | Programming | Contact Us |
Version 1.9 Build 1556 |
|
Package | utility | |
Module | misc | |
Tool | stopwatch |
- tim.help() Stopwatch style timing. Available member functions: tim := stopwatch() # timer is created running and zeroed tim.start() # timer returns mutable values tim.stop() # timer returns fixed values tim.reset() # zeros time w/o state change tim.zero() # stop followed by reset tim.state() # returns 'RUNNING' or 'STOPPED' tim.value() # return current value in seconds tim.fmtvalue(v) # return string formatted value, with units tim.show() # print state and value of timer tim.timefunc(func,niter,label) # time function f. Should take no parameters tim.delete() # destroy the tool Most functions take an optional quiet argument to suppress informational messages. Notice that tim.timefunc(function () {foo(5)}) is a valid call if you wish to avoid defining a new function to provide arguments. After timing a function, the numerical interval can be retrieved with tim.value() F