time

package
v0.0.0-...-6e49935 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2022 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

packge time expand std.time and hide std.time depend for client

Index

Constants

View Source
const (
	Day  = 24 * Hour //expand const
	Week = 7 * Day   //expand const

	Nanosecond  Duration = Duration(time.Nanosecond)
	Microsecond          = Duration(time.Microsecond)
	Millisecond          = Duration(time.Millisecond)
	Second               = Duration(time.Second)
	Minute               = Duration(time.Minute)
	Hour                 = Duration(time.Hour)
)

Variables

This section is empty.

Functions

func Clock

func Clock() uint64

call clock() from C

func Frame

func Frame() uint64

func RDTSC

func RDTSC() uint64

call rdtsc from C

func RuntimeNow

func RuntimeNow() time.Time

func StartSys

func StartSys(autoUpdate Duration)

autoUpdate is autoUpdateTime duration

func StopSys

func StopSys()

func Update

func Update() (err error)

func UpdateAdjust

func UpdateAdjust(_unix_time int64) error

Types

type Duration

type Duration time.Duration

Duration is expand type for time.Duration

func ParseDuration

func ParseDuration(s string) (Duration, error)

re-export std.time.ParseDuration

func Since

func Since(t time.Time) Duration

re-export std.time.Since

func (Duration) Days

func (d Duration) Days() float64

expand method

func (Duration) Hours

func (d Duration) Hours() float64

re-export std.Duration.Hours

func (Duration) Minutes

func (d Duration) Minutes() float64

re-export std.Duration.Minutes

func (Duration) Seconds

func (d Duration) Seconds() float64

re-export std.Duration.Seconds

func (Duration) Std

func (d Duration) Std() time.Duration

std

func (Duration) String

func (d Duration) String() string

expand std.Duration.String

func (Duration) Weeks

func (d Duration) Weeks() float64

expand method

type Snapshot

type Snapshot struct {
}

type Time

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

time with adjust from network

func (*Time) Local

func (this *Time) Local() time.Time

func (*Time) NetAdjust

func (this *Time) NetAdjust() time.Duration

Directories

Path Synopsis
Package stopwatch implements some easy way to mesure time
Package stopwatch implements some easy way to mesure time

Jump to

Keyboard shortcuts

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