remove unused event_scheduler
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
surtur 2022-01-27 20:46:27 +01:00
parent 2b1349b256
commit ad6c01daaa
Signed by: wanderer
GPG Key ID: 19CE1EC1D9E0486D
3 changed files with 0 additions and 52 deletions

View File

@ -259,8 +259,6 @@ set(FORTUNA_HEADERS
do_task.h
event_adder.h
event_adder_impl.h
event_scheduler.h
event_scheduler_impl.h
entropy_src.h
urandom_entropy_src.h
util.h

View File

@ -1,22 +0,0 @@
#ifndef FORTUNA_EVENT_SCHEDULER_H
#define FORTUNA_EVENT_SCHEDULER_H
#include <chrono>
namespace fortuna {
namespace accumulator {
class EventScheduler {
public:
virtual void schedule(const std::chrono::milliseconds& delay_ms) = 0;
EventScheduler(const EventScheduler&) = delete;
EventScheduler& operator=(const EventScheduler&) = delete;
~EventScheduler() noexcept;
};
} // namespace accumulator
} // namespace fortuna
#endif // FORTUNA_EVENT_SCHEDULER_H

View File

@ -1,28 +0,0 @@
#ifndef FORTUNA_EVENT_SCHEDULER_IMPL_H
#define FORTUNA_EVENT_SCHEDULER_IMPL_H
#include "event_scheduler.h"
#include <chrono>
#include <thread>
namespace fortuna {
namespace accumulator {
class EventSchedulerImpl final : public EventScheduler {
private:
std::chrono::milliseconds delay;
public:
EventSchedulerImpl();
void schedule(const std::chrono::milliseconds& delay_ms) override {
auto now{std::chrono::system_clock::now()};
std::this_thread::sleep_until(now + delay_ms);
}
};
} // namespace accumulator
} // namespace fortuna
#endif // FORTUNA_EVENT_SCHEDULER_IMPL_H