Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download
80536 views
1
var now = require("./index")
2
3
module.exports = seeded
4
5
/* Returns a Date.now() like function that's in sync with
6
the seed value
7
*/
8
function seeded(seed) {
9
var current = now()
10
11
return time
12
13
function time() {
14
return seed + (now() - current)
15
}
16
}
17
18