mirror of https://github.com/oxen-io/lokinet
Merge branch 'master' into dev
commit
b543d6243d
@ -1,5 +1,5 @@
|
||||
#ifndef LLARP_COMMON_H
|
||||
#define LLARP_COMMON_H
|
||||
#ifndef LLARP_COMMON_HPP
|
||||
#define LLARP_COMMON_HPP
|
||||
#ifdef __STRICT_ANSI__
|
||||
#define INLINE __inline__
|
||||
#else
|
@ -1,5 +1,5 @@
|
||||
#ifndef LLARP_ENDIAN_H
|
||||
#define LLARP_ENDIAN_H
|
||||
#ifndef LLARP_ENDIAN_HPP
|
||||
#define LLARP_ENDIAN_HPP
|
||||
|
||||
// adapted from libi2pd
|
||||
|
@ -1,8 +1,8 @@
|
||||
#ifndef LLARP_LOGIC_H
|
||||
#define LLARP_LOGIC_H
|
||||
#ifndef LLARP_LOGIC_HPP
|
||||
#define LLARP_LOGIC_HPP
|
||||
#include <llarp/mem.h>
|
||||
#include <llarp/threadpool.h>
|
||||
#include <llarp/timer.h>
|
||||
#include <llarp/timer.hpp>
|
||||
|
||||
struct llarp_logic
|
||||
{
|
@ -1,5 +1,5 @@
|
||||
#ifndef LLARP_PROTO_H
|
||||
#define LLARP_PROTO_H
|
||||
#ifndef LLARP_PROTO_HPP
|
||||
#define LLARP_PROTO_HPP
|
||||
|
||||
#ifndef LLARP_PROTO_VERSION
|
||||
#define LLARP_PROTO_VERSION (0)
|
@ -1,8 +0,0 @@
|
||||
#ifndef LLARP_TIME_H
|
||||
#define LLARP_TIME_H
|
||||
#include <llarp/types.h>
|
||||
|
||||
llarp_time_t
|
||||
llarp_time_now_ms();
|
||||
|
||||
#endif
|
@ -1,11 +1,16 @@
|
||||
#ifndef LLARP_TIME_HPP
|
||||
#define LLARP_TIME_HPP
|
||||
|
||||
#include <llarp/types.hpp>
|
||||
|
||||
#include <chrono>
|
||||
|
||||
namespace llarp
|
||||
{
|
||||
typedef std::chrono::system_clock Clock_t;
|
||||
}
|
||||
using Clock_t = std::chrono::system_clock;
|
||||
|
||||
llarp_time_t
|
||||
time_now_ms();
|
||||
} // namespace llarp
|
||||
|
||||
#endif
|
||||
|
@ -1,8 +1,9 @@
|
||||
#ifndef LLARP_TIMER_H
|
||||
#define LLARP_TIMER_H
|
||||
#include <llarp/common.h>
|
||||
#ifndef LLARP_TIMER_HPP
|
||||
#define LLARP_TIMER_HPP
|
||||
|
||||
#include <llarp/common.hpp>
|
||||
#include <llarp/threadpool.h>
|
||||
#include <llarp/time.h>
|
||||
#include <llarp/time.hpp>
|
||||
|
||||
/** called with userptr, original timeout, left */
|
||||
typedef void (*llarp_timer_handler_func)(void *, uint64_t, uint64_t);
|
@ -1,9 +0,0 @@
|
||||
#ifndef LLARP_TYPES_H
|
||||
#define LLARP_TYPES_H
|
||||
#include <stdint.h>
|
||||
|
||||
typedef uint8_t llarp_proto_version_t;
|
||||
typedef uint64_t llarp_time_t;
|
||||
typedef uint64_t llarp_seconds_t;
|
||||
|
||||
#endif
|
@ -0,0 +1,9 @@
|
||||
#ifndef LLARP_TYPES_H
|
||||
#define LLARP_TYPES_H
|
||||
#include <cstdint>
|
||||
|
||||
using llarp_proto_version_t = std::uint8_t;
|
||||
using llarp_time_t = std::uint64_t;
|
||||
using llarp_seconds_t = std::uint64_t;
|
||||
|
||||
#endif
|
@ -1,5 +1,5 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include <llarp.h> // for llarp_main_init
|
||||
#include <llarp/logic.h> // for threadpool/llarp_logic
|
||||
#include <llarp/logic.hpp> // for threadpool/llarp_logic
|
||||
#include "llarp/net.hpp" // for llarp::Addr
|
||||
#include "llarp/dnsc.hpp"
|
||||
|
Loading…
Reference in New Issue