Commit 4eaa239
committed
random: convert GetRand{Micros,Millis} into randrange
There are only a few call sites of these throughout the codebase, so
move the functionality into FastRandomContext, and rewrite all call sites.
This requires the callers to explicit construct FastRandomContext objects,
which do add to the verbosity, but also make potentially apparent locations
where the code can be improved by reusing a FastRandomContext object (see
further commit).1 parent 82de1b8 commit 4eaa239
4 files changed
+36
-30
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3475 | 3475 | | |
3476 | 3476 | | |
3477 | 3477 | | |
3478 | | - | |
| 3478 | + | |
| 3479 | + | |
3479 | 3480 | | |
3480 | 3481 | | |
3481 | 3482 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1698 | 1698 | | |
1699 | 1699 | | |
1700 | 1700 | | |
1701 | | - | |
| 1701 | + | |
1702 | 1702 | | |
1703 | 1703 | | |
1704 | 1704 | | |
| |||
2050 | 2050 | | |
2051 | 2051 | | |
2052 | 2052 | | |
2053 | | - | |
| 2053 | + | |
2054 | 2054 | | |
2055 | 2055 | | |
2056 | 2056 | | |
| |||
5753 | 5753 | | |
5754 | 5754 | | |
5755 | 5755 | | |
5756 | | - | |
| 5756 | + | |
5757 | 5757 | | |
5758 | 5758 | | |
5759 | 5759 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
135 | 142 | | |
136 | 143 | | |
137 | 144 | | |
| |||
300 | 307 | | |
301 | 308 | | |
302 | 309 | | |
303 | | - | |
| 310 | + | |
304 | 311 | | |
305 | 312 | | |
306 | 313 | | |
| |||
309 | 316 | | |
310 | 317 | | |
311 | 318 | | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
312 | 330 | | |
313 | 331 | | |
314 | 332 | | |
| |||
426 | 444 | | |
427 | 445 | | |
428 | 446 | | |
429 | | - | |
430 | | - | |
431 | | - | |
432 | | - | |
433 | | - | |
434 | | - | |
435 | | - | |
436 | | - | |
437 | | - | |
438 | | - | |
439 | | - | |
440 | | - | |
441 | | - | |
442 | 447 | | |
443 | 448 | | |
444 | 449 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
34 | | - | |
| 33 | + | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
39 | | - | |
| 38 | + | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
44 | | - | |
| 43 | + | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
88 | | - | |
| 87 | + | |
| 88 | + | |
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
93 | | - | |
| 92 | + | |
| 93 | + | |
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
98 | | - | |
| 97 | + | |
| 98 | + | |
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| |||
0 commit comments