rippled
Loading...
Searching...
No Matches
Event.h
1#pragma once
2
3#include <xrpl/beast/insight/EventImpl.h>
4
5#include <chrono>
6#include <memory>
7
8namespace beast {
9namespace insight {
10
20class Event final
21{
22public:
24
29 {
30 }
31
38 {
39 }
40
42 template <class Rep, class Period>
43 void
45 {
46 using namespace std::chrono;
47 if (m_impl)
48 m_impl->notify(ceil<value_type>(value));
49 }
50
52 impl() const
53 {
54 return m_impl;
55 }
56
57private:
59};
60
61} // namespace insight
62} // namespace beast
std::chrono::milliseconds value_type
Definition EventImpl.h:14
A metric for reporting event timing.
Definition Event.h:21
std::shared_ptr< EventImpl > m_impl
Definition Event.h:58
std::shared_ptr< EventImpl > const & impl() const
Definition Event.h:52
Event(std::shared_ptr< EventImpl > const &impl)
Create the metric reference the specified implementation.
Definition Event.h:37
Event()
Create a null metric.
Definition Event.h:28
void notify(std::chrono::duration< Rep, Period > const &value) const
Push an event notification.
Definition Event.h:44