Documentation ¶
Overview ¶
Package timeutils provides utilities supplementing the standard 'time' package.
Index ¶
- func CurrentTimeMillis() int64
- func Format(time time.Time) string
- func MillisUnixTime(millis int64) time.Time
- func NanoToTime(nsec int64) time.Time
- func SecondsUnixTime(seconds int64) time.Time
- func SinceInMilliseconds(start time.Time) int64
- func SubNano(x int64, y int64) time.Duration
- func UnixMillis(timeString string) int64
- func UnixSeconds(timeString string) int64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CurrentTimeMillis ¶
func CurrentTimeMillis() int64
func MillisUnixTime ¶
MillisUnixTime converts an int64 milliseconds to a unixTime
func NanoToTime ¶ added in v2.0.2
NanoToTime converts an int64 nanoseconds to a time
func SecondsUnixTime ¶ added in v2.0.2
SecondsUnixTime converts an int64 seconds to a unixTime
func SinceInMilliseconds ¶
func UnixMillis ¶
UnixMillis converts a {Mon, 02 Jan 2006 15:04:05 GMT} time to an int64 milliseconds.
func UnixSeconds ¶ added in v2.0.2
UnixSeconds converts a {Mon, 02 Jan 2006 15:04:05 GMT} time to an int64 seconds.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.