mirror of
https://github.com/JezuzLizard/T4SP-Server-Plugin.git
synced 2025-04-19 21:22:54 +00:00
24 lines
605 B
C++
24 lines
605 B
C++
#pragma once
|
|
|
|
namespace scheduler
|
|
{
|
|
enum pipeline
|
|
{
|
|
server,
|
|
async,
|
|
count,
|
|
};
|
|
|
|
static const bool cond_continue = false;
|
|
static const bool cond_end = true;
|
|
|
|
void schedule(const std::function<bool()>& callback, pipeline type = pipeline::server,
|
|
std::chrono::milliseconds delay = 0ms);
|
|
void loop(const std::function<void()>& callback, pipeline type = pipeline::server,
|
|
std::chrono::milliseconds delay = 0ms);
|
|
void once(const std::function<void()>& callback, pipeline type = pipeline::server,
|
|
std::chrono::milliseconds delay = 0ms);
|
|
|
|
void on_init(const std::function<void()>& callback);
|
|
}
|