diff --git a/cmd/syncthing/gui_windows.go b/cmd/syncthing/gui_windows.go index 3da56bc71..c4afeb1a1 100644 --- a/cmd/syncthing/gui_windows.go +++ b/cmd/syncthing/gui_windows.go @@ -42,6 +42,10 @@ func trackCPUUsage() { curTime := time.Now().UnixNano() timeDiff := curTime - prevTime + // This is sometimes 0, no clue why. + if timeDiff == 0 { + continue + } curUsage := ktime.Nanoseconds() + utime.Nanoseconds() usageDiff := curUsage - prevUsage cpuUsageLock.Lock()