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 "timer.h"
6
7#include <chrono>
8
9namespace asynchost
10{
12 {
13 private:
14 ringbuffer::WriterPtr to_enclave;
15 std::chrono::time_point<std::chrono::system_clock> last;
16
17 public:
19 to_enclave(writer_factory.create_writer_to_inside()),
20 last(std::chrono::system_clock::now())
21 {}
22
23 void on_timer()
24 {
25 RINGBUFFER_WRITE_MESSAGE(AdminMessage::tick, to_enclave);
26 }
27 };
28
30}
Definition ticker.h:12
void on_timer()
Definition ticker.h:23
TickerImpl(ringbuffer::AbstractWriterFactory &writer_factory)
Definition ticker.h:18
Definition proxy.h:51
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