A simple timer/stopwatch implementation.
Specify any number of timers to be managed simultaneously, referenced by any name you give them. In the following example one timer, named "my timer", is used.
// Load dependencies.var simple_timer =var http =// Start timer.simple_timerstart'my timer'var url = ''http
This should produce output like the following.
> node example.jsHTTP request to http://example.com took 125 milliseconds.
true as the second parameter to the
stop methods gives verbose output.
// Load dependencies.var simple_timer =var http =// Start timer.simple_timerstart'my timer' truehttp
The example above produces output like the following.
> node example.js[TIMER] start - my timer[TIMER] stop - my timer[TIMER] delta - my timer: 119
This repository is made available to the public as open source software under the MIT License.