simple-timer
A simple timer/stopwatch implementation.
Example usage
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://example.com'http
This should produce output like the following.
> node example.jsHTTP request to http://example.com took 125 milliseconds.
Passing true
as the second parameter to the start
and 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
Simple.
License
This repository is made available to the public as open source software under the MIT License.