We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a264a69 commit e868dbaCopy full SHA for e868dba
src/core/t-time.c
@@ -532,7 +532,7 @@
532
Set_Random(secs);
533
return R_UNSET;
534
}
535
- secs = Random_Range(secs / SEC_SEC, D_REF(3)) * SEC_SEC;
+ secs = Random_Range(secs, D_REF(3));
536
goto fixTime;
537
538
case A_PICK:
src/tests/units/time-test.r3
@@ -103,6 +103,19 @@ Rebol [
103
104
===end-group===
105
106
+===start-group=== "random"
107
+ --test-- "random time!"
108
+ ;@@ https://github.com/Oldes/Rebol-issues/issues/911
109
+ t: random 0:0:0.10
110
+ --assert all [t > 0:0 t < 0:0:0.10]
111
+ t: random 1:0:0
112
+ --assert all [t > 0:0 t < 1:0:0]
113
+
114
115
+===end-group===
116
117
118
119
;===start-group=== "time protect"
120
; ;@@ https://github.com/Oldes/Rebol-issues/issues/2416
121
; --test-- "time protect 1"
0 commit comments