mirror of
https://github.com/scratchfoundation/golangci-lint.git
synced 2025-08-28 22:28:43 -04:00
build(deps): bump github.com/go-critic/go-critic from 0.5.6 to 0.6.0 (#2041)
Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
This commit is contained in:
parent
6edca924d3
commit
4ce9a19e7d
12 changed files with 33 additions and 27 deletions
|
@ -15,10 +15,10 @@ const noStagesText = "no stages"
|
|||
type Stopwatch struct {
|
||||
name string
|
||||
startedAt time.Time
|
||||
stages map[string]time.Duration
|
||||
log logutils.Log
|
||||
|
||||
sync.Mutex
|
||||
stages map[string]time.Duration
|
||||
mu sync.Mutex
|
||||
}
|
||||
|
||||
func NewStopwatch(name string, log logutils.Log) *Stopwatch {
|
||||
|
@ -110,7 +110,7 @@ func (s *Stopwatch) TrackStage(name string, f func()) {
|
|||
startedAt := time.Now()
|
||||
f()
|
||||
|
||||
s.Lock()
|
||||
s.mu.Lock()
|
||||
s.stages[name] += time.Since(startedAt)
|
||||
s.Unlock()
|
||||
s.mu.Unlock()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue