Versions in this module Expand all Collapse all v1 v1.0.2 Jun 7, 2021 Changes in this version type Stopwatch + func (s *Stopwatch) ElapsedTimeFrom(now time.Time) time.Duration + func (s *Stopwatch) LapWithDataAndTime(now time.Time, state string, data map[string]interface{}) Lap v1.0.1 Jun 1, 2021 Changes in this version type FormattingMode + const FormattingModeJsonMsObject v1.0.0 May 18, 2021 Changes in this version + const VERSION + type FormattingMode string + const FormattingModeJsonArray + const FormattingModeJsonSimpleObject + type Lap struct + func (l Lap) String() string + type Stopwatch struct + func New(offset time.Duration, active bool) *Stopwatch + func (s *Stopwatch) ElapsedTime() time.Duration + func (s *Stopwatch) Lap(state string) Lap + func (s *Stopwatch) LapTime() time.Duration + func (s *Stopwatch) LapWithData(state string, data map[string]interface{}) Lap + func (s *Stopwatch) Laps() []Lap + func (s *Stopwatch) MarshalJSON() ([]byte, error) + func (s *Stopwatch) Reset(offset time.Duration, active bool) + func (s *Stopwatch) SetFormatter(formatter func(time.Duration) string) + func (s *Stopwatch) SetFormattingMode(newMode FormattingMode) + func (s *Stopwatch) Start() + func (s *Stopwatch) Stop() + func (s *Stopwatch) String() string