Skip to content

v0.3.0: timers

Compare
Choose a tag to compare
@StreetStrider StreetStrider released this 23 Mar 23:13
· 205 commits to master since this release

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 like timeEnd but does not output result, instead returns it, allowing to use it later.
  • console.time.end as semantical alias for console.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 to timeEnd one timer multiple times), open issue.

What's else:

  • Fixed doubling of console.count output (902fd21).
  • Added several examples focused on certain features. Can be found in examples/.
  • Minor customization defaults improvements (af29673).