您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

seed.js 271B

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. }