Commit 2481481f authored by Alexander Morozov's avatar Alexander Morozov Committed by Ian Lance Taylor

runtime: fix comments in time.go

Change-Id: I5c501f598f41241e6d7b21d98a126827a3c3ad9a
Reviewed-on: https://go-review.googlesource.com/32018Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
parent 6e02750d
...@@ -88,12 +88,12 @@ func addtimer(t *timer) { ...@@ -88,12 +88,12 @@ func addtimer(t *timer) {
unlock(&timers.lock) unlock(&timers.lock)
} }
// Add a timer to the heap and start or kick the timer proc. // Add a timer to the heap and start or kick timerproc if the new timer is
// If the new timer is earlier than any of the others. // earlier than any of the others.
// Timers are locked. // Timers are locked.
func addtimerLocked(t *timer) { func addtimerLocked(t *timer) {
// when must never be negative; otherwise timerproc will overflow // when must never be negative; otherwise timerproc will overflow
// during its delta calculation and never expire other runtime·timers. // during its delta calculation and never expire other runtime timers.
if t.when < 0 { if t.when < 0 {
t.when = 1<<63 - 1 t.when = 1<<63 - 1
} }
...@@ -150,7 +150,7 @@ func deltimer(t *timer) bool { ...@@ -150,7 +150,7 @@ func deltimer(t *timer) bool {
// Timerproc runs the time-driven events. // Timerproc runs the time-driven events.
// It sleeps until the next event in the timers heap. // It sleeps until the next event in the timers heap.
// If addtimer inserts a new earlier event, addtimer1 wakes timerproc early. // If addtimer inserts a new earlier event, it wakes timerproc early.
func timerproc() { func timerproc() {
timers.gp = getg() timers.gp = getg()
for { for {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment