aboutsummaryrefslogtreecommitdiff
path: root/src/time
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2024-02-14 11:56:57 -0500
committerRuss Cox <rsc@golang.org>2024-02-28 16:43:49 +0000
commit4a3c3ec9966022fd6a02e1790f71536acd6bcf1e (patch)
tree944bdedfc243ae3b0f771861b528355afda385fe /src/time
parent8a493a667268083a6e33de606fd90e82ddd694f0 (diff)
downloadgo-4a3c3ec9966022fd6a02e1790f71536acd6bcf1e.tar.gz
go-4a3c3ec9966022fd6a02e1790f71536acd6bcf1e.zip
runtime: delete addtimer
modtimer can always be used in place of addtimer. Do that and delete addtimer, avoiding duplicated logic. [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: I70291796bdac3bef5e0850f039f6f4a1da4498ae Reviewed-on: https://go-review.googlesource.com/c/go/+/564118 Reviewed-by: Ian Lance Taylor <iant@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'src/time')
-rw-r--r--src/time/sleep.go2
-rw-r--r--src/time/tick.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/time/sleep.go b/src/time/sleep.go
index 0aec4cacc6..ffc69bcd2a 100644
--- a/src/time/sleep.go
+++ b/src/time/sleep.go
@@ -41,7 +41,7 @@ func when(d Duration) int64 {
func startTimer(*runtimeTimer)
func stopTimer(*runtimeTimer) bool
func resetTimer(*runtimeTimer, int64) bool
-func modTimer(t *runtimeTimer, when, period int64, f func(any, uintptr), arg any, seq uintptr)
+func modTimer(t *runtimeTimer, when, period int64)
// The Timer type represents a single event.
// When the Timer expires, the current time will be sent on C,
diff --git a/src/time/tick.go b/src/time/tick.go
index 9da16b5d58..e06810db5d 100644
--- a/src/time/tick.go
+++ b/src/time/tick.go
@@ -55,7 +55,7 @@ func (t *Ticker) Reset(d Duration) {
if t.r.f == nil {
panic("time: Reset called on uninitialized Ticker")
}
- modTimer(&t.r, when(d), int64(d), t.r.f, t.r.arg, t.r.seq)
+ modTimer(&t.r, when(d), int64(d))
}
// Tick is a convenience wrapper for NewTicker providing access to the ticking