MCPcopy
hub / github.com/pterm/pterm / GetElapsedTime

Method GetElapsedTime

progressbar_printer.go:348–350  ·  view source on GitHub ↗

GetElapsedTime returns the elapsed time, since the ProgressbarPrinter was started.

()

Source from the content-addressed store, hash-verified

346
347// GetElapsedTime returns the elapsed time, since the ProgressbarPrinter was started.
348func (p *ProgressbarPrinter) GetElapsedTime() time.Duration {
349 return time.Since(p.startedAt)
350}
351
352func (p *ProgressbarPrinter) parseElapsedTime() string {
353 // time.Duration.Round panics if the rounding factor is <= 0.

Callers 2

parseElapsedTimeMethod · 0.95

Calls

no outgoing calls

Tested by 1