MCPcopy Create free account
hub / github.com/diillson/chatcli / Stop

Method Stop

cli/metrics/timer.go:71–90  ·  view source on GitHub ↗

Stop para o timer e retorna a duração total

()

Source from the content-addressed store, hash-verified

69
70// Stop para o timer e retorna a duração total
71func (t *Timer) Stop() time.Duration {
72 t.mu.Lock()
73 defer t.mu.Unlock()
74
75 if !t.running {
76 return 0
77 }
78
79 t.stopTime = time.Now()
80 t.running = false
81
82 if t.cancel != nil {
83 t.cancel()
84 }
85 if t.updateTicker != nil {
86 t.updateTicker.Stop()
87 }
88
89 return t.stopTime.Sub(t.startTime)
90}
91
92// Elapsed retorna o tempo decorrido (funciona mesmo com timer rúdando)
93func (t *Timer) Elapsed() time.Duration {

Callers 13

WatchStreamFunction · 0.95
loginAnthropicLocalhostFunction · 0.95
LoginOpenAICodexOAuthFunction · 0.95
backgroundLoopMethod · 0.95
startMCPConfigWatcherMethod · 0.95
loopMethod · 0.95
sleepUntilLockedMethod · 0.95
watchForChangesMethod · 0.95
IntentDebounceMethod · 0.95
sleepUntilLockedMethod · 0.95

Calls 3

LockMethod · 0.80
UnlockMethod · 0.80
StopMethod · 0.65

Tested by 2