You are not logged in.
Login
or
Register
.
JsPHP: a JavaScript library providing the PHP API
Home
Register
Demo
Categories
Functions
Contributors
Download
Links
Comments
FAQ
Contact
View
Edit
Benchmark
Revisions
Developers
Dependencies
Talk
Links
microtime:
Edit: microtime
Function:
microtime
View microtime
Edit microtime
Edit code
Edit tests
Edit benchmark
View latest code
Edit latest code
Benchmark microtime
Comment on microtime
Comment on the latest code
View revisions
View versions
View contributors
View dependencies
View comments
View links
Download production code
Download development code
View the PHP docs
View phpjs.org
View phpjs.org raw code
Description:
Returns either a string or a float containing the current time in seconds and microseconds.
Edit function
Code
:
function microtime (get_as_float) { // http://jsphp.co/jsphp/fn/view/microtime // + original by: Paulo Freitas // * example 1: timeStamp = microtime(true); // * results 1: timeStamp > 1000000000 && timeStamp < 2000000000 var now = new Date().getTime() / 1000; var s = parseInt(now, 10); return (get_as_float) ? now : (Math.round((now - s) * 1000) / 1000) + ' ' + s; }
You have to be logged in to edit functions.
Edit tests
Code
:
You have to be logged in to edit tests.
Edit benchmark
Code
:
You have to be logged in to edit benchmarks.
[
top
]
Comments
There are no comments yet, be the first!
Please
Login
or
Register
to post comments.