[backport] fix #12418, fix random.randomize on JS backend (#12432)

This commit is contained in:
Miran 2019-10-15 16:29:32 +02:00 • committed by Andreas Rumpf
commit 5f5ac8ce16

View file

@ -642,7 +642,7 @@ when not defined(nimscript):
## * `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() * 1000) let time = int64(times.epochTime() * 1000) and 0x7fff_ffff
randomize(time) randomize(time)
else: else:
let now = times.getTime() let now = times.getTime()