system

package
v0.0.0-...-fc6652f Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(path string)

Init -> system

Types

type Clock

type Clock struct {
	// contains filtered or unexported fields
}

Clock -> Utility class that measures the elapsed time.

func ClockCreate

func ClockCreate() Clock

ClockCreate -> Create a new clock and start it

func (Clock) Copy

func (clock Clock) Copy() Clock

Copy -> Create a new clock by copying an existing one

func (Clock) Destroy

func (clock Clock) Destroy()

Destroy -> Destroy a clock

func (Clock) GetElapsedTime

func (clock Clock) GetElapsedTime() Time

GetElapsedTime -> Get the time elapsed in a clock

func (Clock) Restart

func (clock Clock) Restart() Time

Restart -> Restart a clock

type Time

type Time struct {
	Microseconds int64
}

Time -> Represents a time value.

var TimeZero Time = Time{}

TimeZero -> Predefined "zero" time value

func Microseconds

func Microseconds(amount int64) Time

Microseconds -> Construct a time value from a number of microseconds

func Milliseconds

func Milliseconds(amount int32) Time

Milliseconds -> Construct a time value from a number of milliseconds

func Seconds

func Seconds(amount float32) Time

Seconds -> Construct a time value from a number of seconds

func (Time) AsMicroseconds

func (time Time) AsMicroseconds() int64

AsMicroseconds -> Return a time value as a number of microseconds

func (Time) AsMilliseconds

func (time Time) AsMilliseconds() int32

AsMilliseconds -> Return a time value as a number of milliseconds

func (Time) AsSeconds

func (time Time) AsSeconds() float32

AsSeconds -> Return a time value as a number of seconds

Jump to

Keyboard shortcuts

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