runtime: avoid an allocation in (*time.Timer).Reset

This commit is contained in:
Elias Naur
2025-05-09 15:52:48 +02:00
committed by Ron Evans
parent 2da9d26e21
commit 180662f038
6 changed files with 25 additions and 25 deletions
+3 -3
View File
@@ -110,11 +110,11 @@ func addTimer(tim *timerNode) {
timerQueueLock.Unlock()
}
func removeTimer(tim *timer) bool {
func removeTimer(tim *timer) *timerNode {
timerQueueLock.Lock()
removed := timerQueueRemove(tim)
n := timerQueueRemove(tim)
timerQueueLock.Unlock()
return removed
return n
}
func schedulerRunQueue() *task.Queue {