mirror of
https://github.com/Tha14/toxic.git
synced 2025-06-30 03:56:45 +02:00
Use time_t instead of uint64_t for timestamps
Also call time() directly from get_unix_time() instead of manually updating the time val.
This commit is contained in:
@ -101,7 +101,7 @@ struct Node {
|
||||
static struct DHT_Nodes {
|
||||
struct Node list[MAX_NODES];
|
||||
size_t count;
|
||||
uint64_t last_updated;
|
||||
time_t last_updated;
|
||||
} Nodes;
|
||||
|
||||
|
||||
@ -574,7 +574,7 @@ static void DHT_bootstrap(Tox *m)
|
||||
/* Manages connection to the Tox DHT network. */
|
||||
void do_tox_connection(Tox *m)
|
||||
{
|
||||
static uint64_t last_bootstrap_time = 0;
|
||||
static time_t last_bootstrap_time = 0;
|
||||
bool connected = tox_self_get_connection_status(m) != TOX_CONNECTION_NONE;
|
||||
|
||||
if (!connected && timed_out(last_bootstrap_time, TRY_BOOTSTRAP_INTERVAL)) {
|
||||
|
Reference in New Issue
Block a user