sched– 事件调度程序 源代码: Lib / sched.py sched模块定义了一个实现通用事件调度程序的类: class sched.scheduler(timefunc=time.monotonic, delayfunc=time.sleep) schedulerclass定义了一个调度事件的通用接口。它需要两个函数来实际处理“外部世界” – timefunc应该可以不带参数调用,并返回一个数字(“时间”,任何单位)。如果time.monotonic不可用,则timefunc默认为time.time。delayfunc函数应该可以使用one//gument调