We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b12d836 commit 62ae63bCopy full SHA for 62ae63b
src/main/cljs/cljs/core.cljs
@@ -337,9 +337,14 @@
337
"Returns highest resolution time offered by host in milliseconds."
338
[]
339
(cond
340
- (exists? js/performance) (.now js/performance)
341
- (exists? js/process) (let [t (.hrtime js/process)]
342
- (/ (+ (* (aget t 0) 1e9) (aget t 1)) 1e6))
+ (and (exists? js/performance)
+ (not (nil? (. js/performance -now))))
+ (.now js/performance)
343
+
344
+ (exists? js/process)
345
+ (let [t (.hrtime js/process)]
346
+ (/ (+ (* (aget t 0) 1e9) (aget t 1)) 1e6))
347
348
:else (.getTime (js/Date.))))
349
350
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; arrays ;;;;;;;;;;;;;;;;
0 commit comments