v0.3.0: timers
This release mainly introduces timers.
console.time
&console.timeEnd
as in Node.- Timer feature can be turned off, but for compability reasons it's not removed from object, but replaced with noop-functions.
console.time.retrieve
works liketimeEnd
but does not output result, instead returns it, allowing to use it later.console.time.end
as semantical alias forconsole.timeEnd
.- It is possible to turn on hi-res timer (uses
process.hrtime
):
var console = Console(null, null,
{
timer:
{
hrtime: true
}
});
- This module implementation of
timeEnd
deletes used timer ref, but Node's does not (7cff79f). If anyone will need «broken» Node's implementation (which allow totimeEnd
one timer multiple times), open issue.
What's else: