initial implementation

This commit is contained in:
Roland Conybeare 2023-10-11 17:46:24 -04:00
commit 0157f8dc04
12 changed files with 703 additions and 658 deletions

View file

@ -2,7 +2,8 @@
#pragma once
#include "time/Time.hpp"
//#include "time/Time.hpp"
#include "xo/indentlog/timeutil/timeutil.hpp"
#include <concepts>
namespace xo {
@ -17,7 +18,7 @@ namespace xo {
public:
using event_t = Event;
using utc_nanos = xo::time::utc_nanos;
public:
utc_nanos operator()(Event const & ev) const { return ev.tm(); }
}; /*StructEventTimeFn*/
@ -32,6 +33,15 @@ namespace xo {
utc_nanos operator()(Event const & ev) const { return ev->tm(); }
}; /*PtrEventTimeFn*/
template<typename T>
class PairEventTimeFn {
public:
using utc_nanos = xo::time::utc_nanos;
using event_t = std::pair<utc_nanos, T>;
public:
utc_nanos operator()(event_t const & ev) const { return ev.first; }
}; /*PairEventTimeFn*/
} /*namespace reactor*/
} /*namespace xo*/