clock

package
v0.1.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 12, 2026 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Overview

Package clock provides a clock app that provides customizable timers, alarms, stopwatches, and world clocks.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Clock

type Clock struct {
	core.Tabs
}

func NewClock

func NewClock(parent ...tree.Node) *Clock

NewClock returns a new Clock with the given optional parent:

func (*Clock) Init

func (cl *Clock) Init()

func (*Clock) OnAdd

func (cl *Clock) OnAdd()

type Timer

type Timer struct {
	core.Frame

	// Duration is the total duration of the timer.
	Duration time.Duration

	// Start is when the timer was started.
	Start time.Time

	// Paused is whether the timer is currently paused.
	Paused bool

	// Name is the user-set name of the timer.
	Name string
	// contains filtered or unexported fields
}

Timer is a timer that can be paused, resumed, reset, and removed.

func NewTimer

func NewTimer(parent ...tree.Node) *Timer

NewTimer returns a new Timer with the given optional parent: Timer is a timer that can be paused, resumed, reset, and removed.

func (*Timer) Init

func (tm *Timer) Init()

func (*Timer) SetDuration

func (t *Timer) SetDuration(v time.Duration) *Timer

SetDuration sets the Timer.Duration: Duration is the total duration of the timer.

func (*Timer) SetStart

func (t *Timer) SetStart(v time.Time) *Timer

SetStart sets the Timer.Start: Start is when the timer was started.

Directories

Path Synopsis
Command clock provides a clock app that provides customizable timers, alarms, stopwatches, and world clocks.
Command clock provides a clock app that provides customizable timers, alarms, stopwatches, and world clocks.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL