Age | Commit message (Collapse) | Author |
|
(I found I couldn't remember whether get_mono_time returned unix time or
not, and had to source-dive to find out. This should make that
unnecessary next time!)
|
|
Using the full path including the repo name.
|
|
This uses a trick to get read-write access to `this` from a `const`
member function, similar to C++ `mutable`, but uglier.
|
|
|
|
|
|
|
|
|
|
Presumably the uses of `rand()` were fine because they were not used in
security-sensitive places, but having to think about whether a crappy RNG
is acceptable in each situation requires effort that could better be
spent elsewhere.
Also, this means that once we have a custom deterministic RNG for
testing, that RNG is used everywhere, so all the code is deterministic.
It also allowed us to delete a system-specific function that wasn't used
anywhere except in a call to `srand()`.
|
|
It turns out, `unix_time` is also monotonic, and is used as such, so I've
renamed the new functions to `mono_time_*`.
2018-07-08:
```
00:01 <@irungentoo> the idea used to be that the unix_time() function
could go backward in time but I think I might have started using it like
if it could not after I changed it so that it would never go back in time
```
|