Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use performance.now() when available #195

Merged
merged 1 commit into from Nov 14, 2014
Merged

use performance.now() when available #195

merged 1 commit into from Nov 14, 2014

Conversation

duzun
Copy link
Contributor

@duzun duzun commented Nov 14, 2014

With performance.now() we can get more precision.
For ex. PHP version of microtime(true) has up to 6 digits after point. Using performance, the JS version returns the same precision.

I also replaced var s = parseInt(now, 10); with var s = now | 0;, because it is much faster,
and also new Date().getTime() with Date.now() for the same reason: speed

kvz added a commit that referenced this pull request Nov 14, 2014
use performance.now() when available
@kvz kvz merged commit 4984ea7 into locutusjs:master Nov 14, 2014
@kvz
Copy link
Collaborator

kvz commented Nov 14, 2014

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants