mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-17 11:13:27 +00:00
runtime: avoid an allocation in (*time.Timer).Reset
This commit is contained in:
@@ -117,11 +117,11 @@ func addTimer(tim *timerNode) {
|
||||
|
||||
// removeTimer is the implementation of time.stopTimer. It removes a timer from
|
||||
// the timer queue, returning true if the timer is present in the timer queue.
|
||||
func removeTimer(tim *timer) bool {
|
||||
func removeTimer(tim *timer) *timerNode {
|
||||
mask := interrupt.Disable()
|
||||
removedTimer := timerQueueRemove(tim)
|
||||
n := timerQueueRemove(tim)
|
||||
interrupt.Restore(mask)
|
||||
return removedTimer
|
||||
return n
|
||||
}
|
||||
|
||||
func schedulerRunQueue() *task.Queue {
|
||||
|
||||
Reference in New Issue
Block a user