uptime

package
v0.0.0-...-cb82286 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Uptime

type Uptime struct {
	Uptime time.Duration
	Sep    byte
	F      fetchFunc
}

func New

func New(sep ...byte) (*Uptime, error)

func (*Uptime) Fetch

func (u *Uptime) Fetch() error

Fetch updates the Uptime struct woth new values

func (Uptime) Since

func (u Uptime) Since() string

Since returns the date and time when the system booted in RFC1123

func (Uptime) SinceFormat

func (u Uptime) SinceFormat(layout string) string

SinceFormat takes a layout as input and returns the date and time when the system booted, according to the layout format FIXME: fix this and remove the gostrftime depdendency

func (Uptime) String

func (u Uptime) String() string

Jump to

Keyboard shortcuts

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