Closed fengyfei closed 7 years ago
根据接口,调整 GoIM 中自定义 Timer.
测试日志: time="2017-04-01T17:50:43+08:00" level=debug msg="[timer: , 2017-04-01 17:52:43, index: 0]" service="access layer" type=timer time="2017-04-01T17:50:43+08:00" level=debug msg="[timer: , 2017-04-01 17:52:44, index: 1]" service="access layer" type=timer time="2017-04-01T17:50:43+08:00" level=debug msg="[timer: , 2017-04-01 17:52:45, index: 2]" service="access layer" type=timer time="2017-04-01T17:50:43+08:00" level=debug msg="[timer: , 2017-04-01 17:52:46, index: 3]" service="access layer" type=timer time="2017-04-01T17:50:43+08:00" level=debug msg="[timer: , 2017-04-01 17:52:47, index: 4]" service="access layer" type=timer time="2017-04-01T17:50:43+08:00" level=debug msg="[timer: , 2017-04-01 17:52:48, index: 5]" service="access layer" type=timer time="2017-04-01T17:50:43+08:00" level=debug msg="[timer: , 2017-04-01 17:52:49, index: 6]" service="access layer" type=timer time="2017-04-01T17:50:43+08:00" level=debug msg="[timer: , 2017-04-01 17:52:50, index: 7]" service="access layer" type=timer time="2017-04-01T17:50:43+08:00" level=debug msg="[timer: , 2017-04-01 17:52:51, index: 8]" service="access layer" type=timer time="2017-04-01T17:50:43+08:00" level=debug msg="[timer: , 2017-04-01 17:52:52, index: 9]" service="access layer" type=timer time="2017-04-01T17:50:43+08:00" level=debug msg="[-----------------------------------------]" service="access layer" type=timer time="2017-04-01T17:50:43+08:00" level=debug msg="[td: , 2017-04-01 17:52:43, 0]" service="access layer" type=timer time="2017-04-01T17:50:43+08:00" level=debug msg="[td: , 2017-04-01 17:52:44, 0]" service="access layer" type=timer time="2017-04-01T17:50:43+08:00" level=debug msg="[td: , 2017-04-01 17:52:45, 0]" service="access layer" type=timer time="2017-04-01T17:50:43+08:00" level=debug msg="[td: , 2017-04-01 17:52:46, 0]" service="access layer" type=timer time="2017-04-01T17:50:43+08:00" level=debug msg="[td: , 2017-04-01 17:52:47, 0]" service="access layer" type=timer time="2017-04-01T17:50:43+08:00" level=debug msg="[td: , 2017-04-01 17:52:48, 0]" service="access layer" type=timer time="2017-04-01T17:50:43+08:00" level=debug msg="[td: , 2017-04-01 17:52:49, 0]" service="access layer" type=timer time="2017-04-01T17:50:43+08:00" level=debug msg="[td: , 2017-04-01 17:52:50, 0]" service="access layer" type=timer time="2017-04-01T17:50:43+08:00" level=debug msg="[td: , 2017-04-01 17:52:51, 0]" service="access layer" type=timer time="2017-04-01T17:50:43+08:00" level=debug msg="[td: , 2017-04-01 17:52:52, 0]" service="access layer" type=timer time="2017-04-01T17:50:43+08:00" level=debug msg="[---------------- timers: 0 ---------------]" service="access layer" type=timer time="2017-04-01T17:50:43+08:00" level=debug msg="[-----------------------------------------]" service="access layer" type=timer time="2017-04-01T17:50:43+08:00" level=debug msg="[---------------- timers: 10 ---------------]" service="access layer" type=timer time="2017-04-01T17:50:43+08:00" level=debug msg="[timer: , 2017-04-01 17:52:43, index: 0]" service="access layer" type=timer time="2017-04-01T17:50:43+08:00" level=debug msg="[timer: , 2017-04-01 17:52:44, index: 1]" service="access layer" type=timer time="2017-04-01T17:50:43+08:00" level=debug msg="[timer: , 2017-04-01 17:52:45, index: 2]" service="access layer" type=timer time="2017-04-01T17:50:43+08:00" level=debug msg="[timer: , 2017-04-01 17:52:46, index: 3]" service="access layer" type=timer time="2017-04-01T17:50:43+08:00" level=debug msg="[timer: , 2017-04-01 17:52:47, index: 4]" service="access layer" type=timer time="2017-04-01T17:50:43+08:00" level=debug msg="[timer: , 2017-04-01 17:52:48, index: 5]" service="access layer" type=timer time="2017-04-01T17:50:43+08:00" level=debug msg="[timer: , 2017-04-01 17:52:49, index: 6]" service="access layer" type=timer time="2017-04-01T17:50:43+08:00" level=debug msg="[timer: , 2017-04-01 17:52:50, index: 7]" service="access layer" type=timer time="2017-04-01T17:50:43+08:00" level=debug msg="[timer: , 2017-04-01 17:52:51, index: 8]" service="access layer" type=timer time="2017-04-01T17:50:43+08:00" level=debug msg="[timer: , 2017-04-01 17:52:52, index: 9]" service="access layer" type=timer time="2017-04-01T17:50:43+08:00" level=debug msg="[-----------------------------------------]" service="access layer" type=timer time="2017-04-01T17:50:43+08:00" level=debug msg="[---------------- timers: 0 ---------------]" service="access layer" type=timer time="2017-04-01T17:50:43+08:00" level=debug msg="[-----------------------------------------]" service="access layer" type=timer time="2017-04-01T17:50:43+08:00" level=debug msg="[---------------- timers: 10 ---------------]" service="access layer" type=timer time="2017-04-01T17:50:43+08:00" level=debug msg="[timer: , 2017-04-01 17:50:45, index: 0]" service="access layer" type=timer time="2017-04-01T17:50:43+08:00" level=debug msg="[timer: , 2017-04-01 17:50:47, index: 1]" service="access layer" type=timer time="2017-04-01T17:50:43+08:00" level=debug msg="[timer: , 2017-04-01 17:50:49, index: 2]" service="access layer" type=timer time="2017-04-01T17:50:43+08:00" level=debug msg="[timer: , 2017-04-01 17:50:51, index: 3]" service="access layer" type=timer time="2017-04-01T17:50:43+08:00" level=debug msg="[timer: , 2017-04-01 17:50:53, index: 4]" service="access layer" type=timer time="2017-04-01T17:50:43+08:00" level=debug msg="[timer: , 2017-04-01 17:50:55, index: 5]" service="access layer" type=timer time="2017-04-01T17:50:43+08:00" level=debug msg="[timer: , 2017-04-01 17:50:57, index: 6]" service="access layer" type=timer time="2017-04-01T17:50:43+08:00" level=debug msg="[timer: , 2017-04-01 17:50:59, index: 7]" service="access layer" type=timer time="2017-04-01T17:50:43+08:00" level=debug msg="[timer: , 2017-04-01 17:51:01, index: 8]" service="access layer" type=timer time="2017-04-01T17:50:43+08:00" level=debug msg="[timer: , 2017-04-01 17:51:03, index: 9]" service="access layer" type=timer time="2017-04-01T17:50:43+08:00" level=debug msg="[-----------------------------------------]" service="access layer" type=timer time="2017-04-01T17:50:45+08:00" level=warning msg="[expire timer no fn]" service="access layer" type=timer time="2017-04-01T17:50:47+08:00" level=warning msg="[expire timer no fn]" service="access layer" type=timer time="2017-04-01T17:50:49+08:00" level=warning msg="[expire timer no fn]" service="access layer" type=timer time="2017-04-01T17:50:51+08:00" level=warning msg="[expire timer no fn]" service="access layer" type=timer time="2017-04-01T17:50:53+08:00" level=warning msg="[expire timer no fn]" service="access layer" type=timer time="2017-04-01T17:50:53+08:00" level=debug msg="[---------------- timers: 10 ---------------]" service="access layer" type=timer time="2017-04-01T17:50:53+08:00" level=debug msg="[timer: , 2017-04-01 17:50:55, index: 0]" service="access layer" type=timer time="2017-04-01T17:50:53+08:00" level=debug msg="[timer: , 2017-04-01 17:50:57, index: 1]" service="access layer" type=timer time="2017-04-01T17:50:53+08:00" level=debug msg="[timer: , 2017-04-01 17:50:55, index: 2]" service="access layer" type=timer time="2017-04-01T17:50:53+08:00" level=debug msg="[timer: , 2017-04-01 17:50:59, index: 3]" service="access layer" type=timer time="2017-04-01T17:50:53+08:00" level=debug msg="[timer: , 2017-04-01 17:51:03, index: 4]" service="access layer" type=timer time="2017-04-01T17:50:53+08:00" level=debug msg="[timer: , 2017-04-01 17:51:01, index: 5]" service="access layer" type=timer time="2017-04-01T17:50:53+08:00" level=debug msg="[timer: , 2017-04-01 17:51:00, index: 6]" service="access layer" type=timer
time="2017-04-01T17:50:53+08:00" level=debug msg="[timer: , 2017-04-01 17:51:05, index: 7]" service="access layer" type=timer
time="2017-04-01T17:50:53+08:00" level=debug msg="[timer: , 2017-04-01 17:51:10, index: 8]" service="access layer" type=timer
time="2017-04-01T17:50:53+08:00" level=debug msg="[timer: , 2017-04-01 17:51:15, index: 9]" service="access layer" type=timer
time="2017-04-01T17:50:53+08:00" level=debug msg="[-----------------------------------------]" service="access layer" type=timer
Process finished with exit code 0
封装自己的 Timer 实现.