initial implementation
This commit is contained in:
parent
43a08a9628
commit
0157f8dc04
12 changed files with 703 additions and 658 deletions
|
|
@ -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*/
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue