From 8b1ef8e07ee73241c5da3d1d7a8d2b2aae5b7d42 Mon Sep 17 00:00:00 2001 From: Judd Date: Thu, 7 Nov 2019 21:48:33 +0800 Subject: [PATCH] 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. --- lib/pure/random.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pure/random.nim b/lib/pure/random.nim index 7283547d6c..00e6243a33 100644 --- a/lib/pure/random.nim +++ b/lib/pure/random.nim @@ -625,7 +625,7 @@ proc shuffle*[T](x: var openArray[T]) = doAssert cards == ["King", "Ace", "Queen", "Ten", "Jack"] shuffle(state, x) -when not defined(nimscript): +when not defined(nimscript) and not defined(standalone): import times proc randomize*() {.benign.} =