mirror of
https://github.com/oxen-io/lokinet.git
synced 2024-11-11 07:10:36 +00:00
7ad47f2dba
* add Time_t using std::chrono for future uses * make decaying hashset constructor with llarp_time_t explicit * add decaying hashset implicit constructor using Time_t * add timeouts for gossiper replay * allow regossip of our RC
25 lines
407 B
C++
25 lines
407 B
C++
#ifndef LLARP_TIME_HPP
|
|
#define LLARP_TIME_HPP
|
|
|
|
#include <util/types.hpp>
|
|
#include <chrono>
|
|
|
|
#include <chrono>
|
|
using namespace std::chrono_literals;
|
|
|
|
namespace llarp
|
|
{
|
|
/// get time right now as milliseconds, this is monotonic
|
|
llarp_time_t
|
|
time_now_ms();
|
|
|
|
using Time_t = std::chrono::milliseconds;
|
|
|
|
/// get time right now as a Time_t, monotonic
|
|
Time_t
|
|
time_now();
|
|
|
|
} // namespace llarp
|
|
|
|
#endif
|