[bugfix] fix #11450, random.initRand crashes in JS backend (#11522)

This commit is contained in:
Miran 2019-06-17 20:46:04 +02:00 • committed by Andreas Rumpf
commit ac3449b93b

View file

@ -607,8 +607,8 @@ when not defined(nimscript):
## See also: ## See also:
## * `randomize proc<#randomize,int64>`_ that accepts a seed ## * `randomize proc<#randomize,int64>`_ that accepts a seed
## * `initRand proc<#initRand,int64>`_ ## * `initRand proc<#initRand,int64>`_
when defined(js): when defined(JS):
let time = int64(times.epochTime() * 1_000_000_000) let time = int64(times.epochTime() * 100_000)
randomize(time) randomize(time)
else: else:
let now = times.getTime() let now = times.getTime()