We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9915007 commit c06c107Copy full SHA for c06c107
1 file changed
src/core/Common.js
@@ -252,9 +252,9 @@ module.exports = Common;
252
253
/**
254
* Returns the current timestamp since the time origin (e.g. from page load).
255
- * The result will be high-resolution including decimal places if available.
+ * The result is in milliseconds and will use high-resolution timing if available.
256
* @method now
257
- * @return {number} the current timestamp
+ * @return {number} the current timestamp in milliseconds
258
*/
259
Common.now = function() {
260
if (typeof window !== 'undefined' && window.performance) {
@@ -265,6 +265,10 @@ module.exports = Common;
265
}
266
267
268
+ if (Date.now) {
269
+ return Date.now();
270
+ }
271
+
272
return (new Date()) - Common._nowStartTime;
273
};
274
0 commit comments