diff options
| author | Jeff Carr <[email protected]> | 2024-01-18 00:57:43 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-01-18 00:57:43 -0600 |
| commit | ff3a51f3544a255b2b2bcd489e7ef71a12e7196a (patch) | |
| tree | 16a0b17d227c71dcb6f96f2ed226a6cbcb712710 /timer.go | |
| parent | 47a665be8bf2724730698fb6775b2f8d904f8629 (diff) | |
gofmt autofix pathsv0.12.9
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'timer.go')
| -rw-r--r-- | timer.go | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -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) } |
