remove unused event_scheduler
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
2b1349b256
commit
ad6c01daaa
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
@ -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
|
Reference in New Issue