timer

package
v0.0.0-...-eef6afc Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2020 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Timer

type Timer struct {
	Name            string
	StartTime       time.Time
	EndTime         time.Time
	TotalDuration   time.Duration
	CurrentDuration time.Duration
	// contains filtered or unexported fields
}

Timer for the logging

func (Timer) IsActive

func (t Timer) IsActive() bool

IsActive checks if the timer is currently ticking

func (*Timer) Start

func (t *Timer) Start() chan time.Duration

Start the timer and posts the duration to a channel

func (*Timer) Stop

func (t *Timer) Stop()

Stop the timer

func (Timer) String

func (t Timer) String() string

String returns a string representation of the current state

Jump to

Keyboard shortcuts

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