summaryrefslogtreecommitdiff
path: root/timer.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-01-18 00:57:43 -0600
committerJeff Carr <[email protected]>2024-01-18 00:57:43 -0600
commitff3a51f3544a255b2b2bcd489e7ef71a12e7196a (patch)
tree16a0b17d227c71dcb6f96f2ed226a6cbcb712710 /timer.go
parent47a665be8bf2724730698fb6775b2f8d904f8629 (diff)
gofmt autofix pathsv0.12.9
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'timer.go')
-rw-r--r--timer.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/timer.go b/timer.go
index 0ba5faf..380e4bb 100644
--- a/timer.go
+++ b/timer.go
@@ -6,12 +6,14 @@ import (
// timeFunction takes a function as an argument and returns the execution time.
func timeFunction(f func()) time.Duration {
- startTime := time.Now() // Record the start time
- f() // Execute the function
+ startTime := time.Now() // Record the start time
+ f() // Execute the function
return time.Since(startTime) // Calculate the elapsed time
}
func (ls *RepoStatus) SetSpeedActual(s string) {
- if ! ls.Ready() {return}
+ if !ls.Ready() {
+ return
+ }
ls.speedActual.SetText(s)
}