diff options
Diffstat (limited to 'src/trackerlogic.h')
| -rw-r--r-- | src/trackerlogic.h | 12 |
1 files changed, 6 insertions, 6 deletions
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 { | |||
| 76 | on startup */ | 76 | on startup */ |
| 77 | #define RANDOMTORRENTS (1024 * 1024 * 1) | 77 | #define RANDOMTORRENTS (1024 * 1024 * 1) |
| 78 | 78 | ||
| 79 | #if defined(CLOCK_REALTIME_COARSE) | 79 | #if defined(CLOCK_MONOTONIC_COARSE) |
| 80 | #define OT_CLOCK_CHEAP CLOCK_REALTIME_COARSE /* Linux */ | 80 | #define OT_CLOCK_CHEAP CLOCK_MONOTONIC_COARSE /* Linux and FreeBSD */ |
| 81 | #elif defined(CLOCK_REALTIME_FAST) | 81 | #elif defined(CLOCK_MONOTONIC_FAST) |
| 82 | #define OT_CLOCK_CHEAP CLOCK_REALTIME_FAST /* the BSDs */ | 82 | #define OT_CLOCK_CHEAP CLOCK_MONOTONIC_FAST /* the other BSDs */ |
| 83 | #else | 83 | #else |
| 84 | #define OT_CLOCK_CHEAP CLOCK_REALTIME /* macOS and whatever else */ | 84 | #define OT_CLOCK_CHEAP CLOCK_MONOTONIC /* macOS and whatever else */ |
| 85 | #endif | 85 | #endif |
| 86 | 86 | ||
| 87 | static inline ot_time time_now_seconds(void) { | 87 | 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 | |||
| 285 | size_t remove_peer_from_torrent(PROTO_FLAG proto, struct ot_workstruct *ws); | 285 | size_t remove_peer_from_torrent(PROTO_FLAG proto, struct ot_workstruct *ws); |
| 286 | void return_tcp_scrape_for_torrent(ot_hash const *hash_list, size_t amount, char **reply, const char *reply_end); | 286 | void return_tcp_scrape_for_torrent(ot_hash const *hash_list, size_t amount, char **reply, const char *reply_end); |
| 287 | size_t return_udp_scrape_for_torrent(ot_hash const hash, char *reply); | 287 | size_t return_udp_scrape_for_torrent(ot_hash const hash, char *reply); |
| 288 | void add_torrent_from_saved_state(ot_hash const hash, ot_time base, size_t down_count); | 288 | void add_torrent_from_saved_state(ot_hash const hash, ot_time age, size_t down_count); |
| 289 | #ifdef _DEBUG_RANDOMTORRENTS | 289 | #ifdef _DEBUG_RANDOMTORRENTS |
| 290 | void trackerlogic_add_random_torrents(size_t amount); | 290 | void trackerlogic_add_random_torrents(size_t amount); |
| 291 | #endif | 291 | #endif |
