You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12345678910111213141516
  1. var now = require("./index")
  2. module.exports = seeded
  3. /* Returns a Date.now() like function that's in sync with
  4. the seed value
  5. */
  6. function seeded(seed) {
  7. var current = now()
  8. return time
  9. function time() {
  10. return seed + (now() - current)
  11. }
  12. }