From 463cbcb19a68bc4109285872258d494332bdeaf6 Mon Sep 17 00:00:00 2001 From: iphydf Date: Wed, 1 Aug 2018 23:37:48 +0000 Subject: Use the crypto random functions instead of `rand()`. 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()`. --- toxcore/mono_time.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'toxcore/mono_time.h') diff --git a/toxcore/mono_time.h b/toxcore/mono_time.h index 63e0f49d..97759560 100644 --- a/toxcore/mono_time.h +++ b/toxcore/mono_time.h @@ -22,9 +22,6 @@ void unix_time_update(void); uint64_t unix_time(void); int is_timeout(uint64_t timestamp, uint64_t timeout); -/* return current UNIX time in microseconds (us). */ -uint64_t current_time_actual(void); - /* return current monotonic time in milliseconds (ms). */ uint64_t current_time_monotonic(void); -- cgit v1.2.3