mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-10-13 20:15:20 +00:00
perf[scheduler]: 使用更加轻量级的实现替代比较重的时间轮算法
This commit is contained in:
1 parent
5a3fc698c8
commit
5cb953f4e8
8 files changed
+99
-349
No files matched your search
@@ -60,7 +60,7 @@ public class CronOrmPersister extends AbstractOrmPersister {
|
||||
var delay = 0L;
|
||||
try {
|
||||
var now = TimeUtils.now();
|
||||
var nextTimestamp = TimeUtils.getNextTimestampByCronExpression(cronExpression, now);
|
||||
var nextTimestamp = TimeUtils.nextTimestampByCronExpression(cronExpression, now);
|
||||
delay = nextTimestamp - now;
|
||||
|
||||
if (delay < 0) {
|
||||
|
||||
Reference in new issue
Block a user