summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2024-09-25 22:50:42 -0300
committerEuAndreh <eu@euandre.org>2024-09-25 22:50:42 -0300
commit849904e13e6bf2a2607ec290950a8ad165fcb2de (patch)
tree07690721cc1ed5e7007df8d114c5d1a51ac687ca /src
parentsrc/gobang.go: Support static and dynamic args in MaeCounter() (diff)
downloadgobang-849904e13e6bf2a2607ec290950a8ad165fcb2de.tar.gz
gobang-849904e13e6bf2a2607ec290950a8ad165fcb2de.tar.xz
src/gobang.go: Remove return value from Timed() thunk
Diffstat (limited to 'src')
-rw-r--r--src/gobang.go7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/gobang.go b/src/gobang.go
index bef87aa..9d544c9 100644
--- a/src/gobang.go
+++ b/src/gobang.go
@@ -202,17 +202,16 @@ func metric(type_ string, label string, args ...any) {
)
}
-func Timed(label string, thunk func() any, args ...any) any {
+func Timed(label string, thunk func(), args ...any) {
var (
start time.Time
end time.Time
- ret any
)
{
start = time.Now()
- ret = thunk()
+ thunk()
end = time.Now()
}
@@ -228,8 +227,6 @@ func Timed(label string, thunk func() any, args ...any) any {
args,
)...,
)
-
- return ret
}
func MakeCounter(label string, staticArgs ...any) func(...any) {