Function grapeTimerR::timer::init_schedule[][src]

pub fn init_schedule(conf: Config) -> TResult<()>

init schedule system [用于初始化调度系统,通过Config]

Examples

use grapeTimerR::{timer::Config,IDMode, timer};

let conf = Config{
        // output log info
        debug: false,
        debug_log:String::from("logs/grapeTimer.log"),
        thread_count: 10,
        // 初始化全局ID的起始ID,可以自行控制
        // Initialize the starting ID of the global ID, which can be controlled by yourself
        id_seed: 1,
        id_type: IDMode::SequenceId
    };

timer::init_schedule(conf);