Fix panic("durations cannot be empty") (#6029)

This commit is contained in:
Andrew Ashikhmin 2022-11-11 15:24:58 +01:00 committed by GitHub
parent 04e3a18463
commit 09c5e4699b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -111,7 +111,7 @@ func (s *Step) doCalibrate() {
// optCalibrate Calibrates the AuRa step number according to the current time.
func (s *Step) optCalibrate() bool {
now := time.Now().Second()
now := time.Now().Unix()
var info StepDurationInfo
i := 0
for _, d := range s.durations {