diff --git a/internal/seckill/scheduler.go b/internal/seckill/scheduler.go index c07b821..df1067a 100644 --- a/internal/seckill/scheduler.go +++ b/internal/seckill/scheduler.go @@ -5,6 +5,7 @@ import ( "bytes" "errors" "fmt" + "math" "math/rand" "os" "path/filepath" @@ -1193,6 +1194,7 @@ func (s *Scheduler) ScheduleRun(req types.SeckillRequest) (map[string]any, error "success": true, "targetTime": targetTime.In(constants.CST).Format("2006-01-02 15:04:05"), "triggerTime": triggerTime.In(constants.CST).Format("2006-01-02 15:04:05"), + "remainSecond": int(math.Ceil(remain.Seconds())), "offsetMs": calibration.Offset.Milliseconds(), "errorBoundMs": calibration.ErrorBound.Milliseconds(), "rttMs": calibration.RTT.Milliseconds(),