Higher precision timing labels and better browser compatability #3

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants
@CMTegner
  • Use performance-now module which picks the higest precision, most performant
    timing option avilable:
    performance.now > process.hrtime > Date.now > new Date().getTime()
    Timing results are now printed with two decimal places (there doesn't seem to
    be any spec available for the console object; FF prints two, while Safari and
    Chrome print three)
  • Date.now is not available in IE<9 or in older versions of Safari and Opera, so
    this change has the added benefit of providing fallbacks for these browsers:
    http://kangax.github.io/es5-compat-table/#Date.now
Higher precision timing labels and better browser compatability
* Use performance-now module which picks the higest precision, most performant
timing option avilable:
performance.now > process.hrtime > Date.now > new Date().getTime()
Timing results are now printed with two decimal places (there doesn't seem to
be any spec available for the console object; FF prints two, while Safari and
Chrome print three)
* Date.now is not available in IE<9 or in older versions of Safari and Opera, so
this change has the added benefit of providing fallbacks for these browsers:
http://kangax.github.io/es5-compat-table/#Date.now
@Raynos

This comment has been minimized.

Show comment Hide comment
@Raynos

Raynos Dec 16, 2013

Owner

This is fine to use, however we should have back compat with the console api for node.

This means it should print the output to the nearest millisecond. i.e. .toFixed(0).

Also it would be preferable to not have a coffee script dependencies. If performance-now is open to being rewritten in javascript then it's a plus. I can make a PR for that if wanted.

Owner

Raynos commented Dec 16, 2013

This is fine to use, however we should have back compat with the console api for node.

This means it should print the output to the nearest millisecond. i.e. .toFixed(0).

Also it would be preferable to not have a coffee script dependencies. If performance-now is open to being rewritten in javascript then it's a plus. I can make a PR for that if wanted.

@Raynos

This comment has been minimized.

Show comment Hide comment
@Raynos

Raynos Apr 8, 2014

Owner

Closing this issue.

Let me know if this is still something you want.

Owner

Raynos commented Apr 8, 2014

Closing this issue.

Let me know if this is still something you want.

@Raynos Raynos closed this Apr 8, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment