CCF
Loading...
Searching...
No Matches
ticker.h
Go to the documentation of this file.
1// Copyright (c) Microsoft Corporation. All rights reserved.
2// Licensed under the Apache 2.0 License.
3#pragma once
4
5#include "enclave.h"
6#include "timer.h"
7
8#include <chrono>
9
10namespace asynchost
11{
13 {
14 private:
15 ringbuffer::WriterPtr to_enclave;
16 std::chrono::time_point<std::chrono::system_clock> last;
17
18 public:
20 to_enclave(writer_factory.create_writer_to_inside()),
21 last(std::chrono::system_clock::now())
22 {}
23
24 void on_timer()
25 {
26 RINGBUFFER_WRITE_MESSAGE(AdminMessage::tick, to_enclave);
27 }
28 };
29
31}
Definition ticker.h:13
void on_timer()
Definition ticker.h:24
TickerImpl(ringbuffer::AbstractWriterFactory &writer_factory)
Definition ticker.h:19
Definition proxy.h:50
Definition ring_buffer_types.h:153
Definition after_io.h:8
std::shared_ptr< AbstractWriter > WriterPtr
Definition ring_buffer_types.h:150
STL namespace.
#define RINGBUFFER_WRITE_MESSAGE(MSG,...)
Definition ring_buffer_types.h:255