Documentation ¶
Overview ¶
Package time contains various common time separate by utility types
Index ¶
- func CurrentEpochNanoSecsInInt64() int64
- func CurrentEpochSecsInFloat() float64
- func CurrentEpochSecsInInt() int
- func CurrentEpochSecsInInt64() int64
- func NanoSecsFromEpochToTime(ts int64) time.Time
- func SecsFromEpochToTime(ts int64) time.Time
- func SecsToNanoSecsInInt64(secs int64) int64
- func StringToTimestamp(timestamp string) (int64, error)
- func TimestampToString(timestamp int64) string
- func ToNanoSecsFromEpoch(t *time.Time) int64
- func ToSecsFromEpoch(t *time.Time) int64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CurrentEpochNanoSecsInInt64 ¶
func CurrentEpochNanoSecsInInt64() int64
CurrentEpochNanoSecsInInt64 returns the current time as a timestamp from epoch as type int64 in nanoseconds.
func CurrentEpochSecsInFloat ¶
func CurrentEpochSecsInFloat() float64
CurrentEpochSecsInFloat returns the current time as a timestamp from epoch as type float64 in seconds.
func CurrentEpochSecsInInt ¶
func CurrentEpochSecsInInt() int
CurrentEpochSecsInInt returns the current time as a timestamp from epoch as type int in seconds.
func CurrentEpochSecsInInt64 ¶
func CurrentEpochSecsInInt64() int64
CurrentEpochSecsInInt64 returns the current time as a timestamp from epoch as type int64 in seconds.
func NanoSecsFromEpochToTime ¶
NanoSecsFromEpochToTime converts an int64 of nanoseconds from epoch to Time struct
func SecsFromEpochToTime ¶
SecsFromEpochToTime converts an int64 of seconds from epoch to Time struct
func SecsToNanoSecsInInt64 ¶
SecsToNanoSecsInInt64 converts a value from secs to nanoseconds.
func StringToTimestamp ¶
StringToTimestamp converts a string timestamp to int64
func TimestampToString ¶
TimestampToString converts an int64 timestamp to string
func ToNanoSecsFromEpoch ¶
ToNanoSecsFromEpoch converts a time.Time struct to nanoseconds from epoch.
func ToSecsFromEpoch ¶
ToSecsFromEpoch converts a time.Time struct to nanoseconds from epoch.
Types ¶
This section is empty.