UNPKG
@soapbox.pub/wasmboy
Version:
latest (0.8.0)
0.8.0
Soapbox fork of Wasmboy.
gitlab.com/soapbox-pub/wasmboy
@soapbox.pub/wasmboy
/
lib
/
common
/
common.js
11 lines
(9 loc)
•
252 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
// Common Static functions
// Function to get performance timestamp
// This is to support node vs. Browser
export
const
getPerformanceTimestamp
= (
) => {
if
(
typeof
window
!==
'undefined'
) {
return
performance.
now
(); }
return
Date
.
now
(); };