timestamp

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2024 License: CC0-1.0, MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type T

type T int64

T is a convenience type for UNIX 64 bit timestamps of 1 second precision.

func FromTime

func FromTime(t time.Time) T

FromTime returns a T from a time.Time

func Now

func Now() T

Now returns the current UNIX timestamp of the current second.

func (T) Ptr

func (t T) Ptr() *Tp

Ptr returns the pointer so values can register as nil and omitted.

func (T) Time

func (t T) Time() time.Time

Time converts a timestamp.Time value into a canonical UNIX 64 bit 1 second precision timestamp.

type Tp

type Tp T

Tp is a synonym that makes it possible to use this value with the extra feature of the property of set/unset by the Ptr function which takes the address.

This is to

func (*Tp) Clone

func (tp *Tp) Clone() (tc *Tp)

func (*Tp) String

func (tp *Tp) String() string

func (*Tp) T

func (tp *Tp) T() T

Jump to

Keyboard shortcuts

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