allow random module to be used in standalone: (#12617)

proc randomized*() uses time releated function which is not available on
standalone, so disable this function for standalone.
This commit is contained in:
Judd 2019-11-07 21:48:33 +08:00 • committed by Andreas Rumpf
commit 8b1ef8e07e

View file

@ -625,7 +625,7 @@ proc shuffle*[T](x: var openArray[T]) =
doAssert cards == ["King", "Ace", "Queen", "Ten", "Jack"] doAssert cards == ["King", "Ace", "Queen", "Ten", "Jack"]
shuffle(state, x) shuffle(state, x)
when not defined(nimscript): when not defined(nimscript) and not defined(standalone):
import times import times
proc randomize*() {.benign.} = proc randomize*() {.benign.} =