mirror of
https://github.com/oxen-io/lokinet.git
synced 2024-10-31 09:20:21 +00:00
95cd275cdd
* add lokinet_add_bootstrap_rc function for adding an rc from memory * prevent stack overflow on error closing connection in quic * add in memory nodedb * refactor how convotags are set as active * add initial stubs for endpoint statistics * refactor time stuff to be a bit cleaner * update lnproxy script with more arguments
30 lines
509 B
C++
30 lines
509 B
C++
#pragma once
|
|
|
|
#include "types.hpp"
|
|
#include <nlohmann/json.hpp>
|
|
#include <iostream>
|
|
|
|
using namespace std::chrono_literals;
|
|
|
|
namespace llarp
|
|
{
|
|
/// get time right now as milliseconds, this is monotonic
|
|
Duration_t
|
|
time_now_ms();
|
|
|
|
/// get the uptime of the process
|
|
Duration_t
|
|
uptime();
|
|
|
|
/// convert to milliseconds
|
|
uint64_t
|
|
ToMS(Duration_t duration);
|
|
|
|
std::ostream&
|
|
operator<<(std::ostream& out, const Duration_t& t);
|
|
|
|
nlohmann::json
|
|
to_json(const Duration_t& t);
|
|
|
|
} // namespace llarp
|