// TJP COPYRIGHT HEADER // // Timer.h // algorithm // // Created by Timothy Prepscius on 1/19/18. // Copyright © 2018 Timothy Prepscius. All rights reserved. // #pragma once #include "Scheduler.h" #include #include #include "Time.h" namespace timprepscius::core::time { struct SchedulerEvent { virtual ~SchedulerEvent () {} virtual void cancel () = 0; } ; struct Scheduler { virtual SchedulerEventPtr schedule(Duration period, bool repeat, std::function &&f) = 0; virtual ~Scheduler(); Future after(Duration period); template Future schedule(Duration period, F &&f); template Future schedule_future(Duration period, F &&f); template Future schedule(F &&f); template Future schedule_future(F &&f); template void run(F &&f); }; } // namespace #include "Scheduler.inl"