perf[scheduler]: 使用更加轻量级的实现替代比较重的时间轮算法

This commit is contained in:
jaysunxiao
2021-10-10 21:56:07 +08:00
parent 5a3fc698c8
commit 5cb953f4e8
8 changed files with 99 additions and 349 deletions
@@ -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) {