[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
parent 1aed455e7c
commit 5f5ac8ce16

View File

@@ -642,7 +642,7 @@ when not defined(nimscript):
## * `randomize proc<#randomize,int64>`_ that accepts a seed
## * `initRand proc<#initRand,int64>`_
when defined(JS):
let time = int64(times.epochTime() * 1000)
let time = int64(times.epochTime() * 1000) and 0x7fff_ffff
randomize(time)
else:
let now = times.getTime()