定时任务

This commit is contained in:
zogodo
2019-12-12 21:40:52 +08:00
parent 7bca1e0a61
commit 7443277d6b
3 changed files with 88 additions and 1 deletions

View File

@@ -0,0 +1,17 @@
#pragma once
struct TimedTask;
typedef struct TimedTask* pTimedTask;
struct TimedTask
{
int time; //被执行的格林尼治时间戳
int socket_idx; //要控制的插孔
int on; //开或者关
pTimedTask next; //下一个任务(按之间排序)
};
extern pTimedTask task_top;
bool AddTask(pTimedTask task);
bool DelTask();
char* GetTaskStr();