mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-12 06:53:40 +00:00
runtime: avoid an allocation in (*time.Timer).Reset
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user