2018-10-08 11:56:40 +00:00
|
|
|
#ifndef LLARP_TIME_HPP
|
|
|
|
#define LLARP_TIME_HPP
|
|
|
|
|
2019-01-10 19:41:51 +00:00
|
|
|
#include <util/types.hpp>
|
2020-02-25 17:05:13 +00:00
|
|
|
#include <nlohmann/json.hpp>
|
2018-11-19 22:45:37 +00:00
|
|
|
|
2020-02-24 19:40:45 +00:00
|
|
|
using namespace std::chrono_literals;
|
2020-01-30 22:10:56 +00:00
|
|
|
|
2018-10-08 11:56:40 +00:00
|
|
|
namespace llarp
|
|
|
|
{
|
2020-01-23 14:41:33 +00:00
|
|
|
/// get time right now as milliseconds, this is monotonic
|
2018-11-19 22:45:37 +00:00
|
|
|
llarp_time_t
|
|
|
|
time_now_ms();
|
2020-02-25 17:05:13 +00:00
|
|
|
|
2020-04-07 18:38:56 +00:00
|
|
|
std::ostream&
|
|
|
|
operator<<(std::ostream& out, const llarp_time_t& t);
|
2020-02-25 17:05:13 +00:00
|
|
|
|
|
|
|
nlohmann::json
|
2020-04-07 18:38:56 +00:00
|
|
|
to_json(const llarp_time_t& t);
|
2020-01-30 22:10:56 +00:00
|
|
|
|
2018-11-19 22:45:37 +00:00
|
|
|
} // namespace llarp
|
2018-10-08 11:56:40 +00:00
|
|
|
|
|
|
|
#endif
|