Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatDuration ¶
FormatDuration formats a duration in a human-readable way
func FormatDurationShort ¶
FormatDurationShort formats a duration in a compact way
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager manages multiple timers
func (*Manager) ActiveCount ¶
ActiveCount returns the number of active (non-expired) timers
func (*Manager) GetActive ¶
GetActive returns all active (non-expired) timers sorted by remaining time (ascending)
func (*Manager) GetExpired ¶
GetExpired returns all expired timers and removes them from the manager
type Timer ¶
type Timer struct {
ID string
StartTime time.Time
Duration time.Duration
Label string // optional label for the timer
}
Timer represents a countdown timer
func (*Timer) PercentComplete ¶
PercentComplete returns the percentage of time elapsed (0-100)
Click to show internal directories.
Click to hide internal directories.