]> Cypherpunks repositories - gostls13.git/commit
runtime: delete clearDeletedTimers
authorRuss Cox <rsc@swtch.com>
Wed, 14 Feb 2024 03:31:33 +0000 (22:31 -0500)
committerRuss Cox <rsc@golang.org>
Wed, 28 Feb 2024 16:43:44 +0000 (16:43 +0000)
commit77f0bd01fbc9cc7e77d86756d273b69a5855c2c3
tree0917cccb1ad0fb1c487c68a1487b8c7b4b13f7bc
parent0728e2b139b63cf203487bd5f76b64507392b780
runtime: delete clearDeletedTimers

adjusttimers already contains the same logic. Use it instead.
This avoids having two copies of the code and is faster.

adjusttimers was formerly O(n log n) but is now O(n).
clearDeletedTimers was formerly O(n² log n) and is now gone!

[This is one CL in a refactoring stack making very small changes
in each step, so that any subtle bugs that we miss can be more
easily pinpointed to a small change.]

Change-Id: I32bf24817a589033dc304b359f8df10ea21f48fc
Reviewed-on: https://go-review.googlesource.com/c/go/+/564116
Reviewed-by: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/runtime/proc.go
src/runtime/time.go