From d620e4c3ea42b0df6eb5e8dab92d7a8f031fa617 Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Thu, 5 Nov 2026 13:59:14 +0100 Subject: Take the clock off the wall --- src/trackerlogic.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/trackerlogic.h') diff --git a/src/trackerlogic.h b/src/trackerlogic.h index c8d859c..f6aa8cc 100644 --- a/src/trackerlogic.h +++ b/src/trackerlogic.h @@ -76,12 +76,12 @@ typedef struct { on startup */ #define RANDOMTORRENTS (1024 * 1024 * 1) -#if defined(CLOCK_REALTIME_COARSE) -#define OT_CLOCK_CHEAP CLOCK_REALTIME_COARSE /* Linux */ -#elif defined(CLOCK_REALTIME_FAST) -#define OT_CLOCK_CHEAP CLOCK_REALTIME_FAST /* the BSDs */ +#if defined(CLOCK_MONOTONIC_COARSE) +#define OT_CLOCK_CHEAP CLOCK_MONOTONIC_COARSE /* Linux and FreeBSD */ +#elif defined(CLOCK_MONOTONIC_FAST) +#define OT_CLOCK_CHEAP CLOCK_MONOTONIC_FAST /* the other BSDs */ #else -#define OT_CLOCK_CHEAP CLOCK_REALTIME /* macOS and whatever else */ +#define OT_CLOCK_CHEAP CLOCK_MONOTONIC /* macOS and whatever else */ #endif static inline ot_time time_now_seconds(void) { @@ -285,7 +285,7 @@ size_t add_peer_to_torrent_and_return_peers(PROTO_FLAG proto, struct ot_workstru size_t remove_peer_from_torrent(PROTO_FLAG proto, struct ot_workstruct *ws); void return_tcp_scrape_for_torrent(ot_hash const *hash_list, size_t amount, char **reply, const char *reply_end); size_t return_udp_scrape_for_torrent(ot_hash const hash, char *reply); -void add_torrent_from_saved_state(ot_hash const hash, ot_time base, size_t down_count); +void add_torrent_from_saved_state(ot_hash const hash, ot_time age, size_t down_count); #ifdef _DEBUG_RANDOMTORRENTS void trackerlogic_add_random_torrents(size_t amount); #endif -- cgit v1.3