Skip to content

Commit

Permalink
fix: lint error (#119)
Browse files Browse the repository at this point in the history
  • Loading branch information
r3inbowari authored Mar 17, 2023
1 parent 48b2378 commit 9a4e5d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions speedtest/data_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ func (dm *DataManager) CallbackDownloadRate(callback func(downRate float64)) *ti
go func() {
sTime := time.Now()
for range ticker.C {
callback((float64(dm.GetTotalDownload()) * 8 / 1000000) / float64(time.Now().Sub(sTime).Milliseconds()) * 1000)
callback((float64(dm.GetTotalDownload()) * 8 / 1000000) / float64(time.Since(sTime).Milliseconds()) * 1000)
}
}()
return ticker
Expand All @@ -116,7 +116,7 @@ func (dm *DataManager) CallbackUploadRate(callback func(upRate float64)) *time.T
go func() {
sTime := time.Now()
for range ticker.C {
callback((float64(dm.GetTotalUpload()) * 8 / 1000000) / float64(time.Now().Sub(sTime).Milliseconds()) * 1000)
callback((float64(dm.GetTotalUpload()) * 8 / 1000000) / float64(time.Since(sTime).Milliseconds()) * 1000)
}
}()
return ticker
Expand Down

0 comments on commit 9a4e5d3

Please sign in to comment.