Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertMicrosecondsToUnixTime ¶
ConvertMicrosecondsToUnixTime converts the UTC time in microseconds to a time.Time struct (unix time)
func StringTimestampToHumanReadableFormat ¶
func StringTimestampToHumanReadableFormat(unixTimestampAsString string) (humanReadable string, parsedTimestamp int64, err error)
StringTimestampToHumanReadableFormat parses and sanity-checks a unix timestamp as string and returns it as int64 and a human-readable representation of it
func TimeAnchor ¶
TimeAnchor gives you back a timestamp of the first caller that ever called this function
Types ¶
type TimelineProvider ¶
type TimelineProvider interface { // Now Returns the current (client-side) time in UTC Now() time.Time // Sleep suspends the current goroutine for the specified duration Sleep(duration time.Duration) }
TimelineProvider abstracts away the time.Now() and time.Sleep(time.Duration) functions to make code unit-testable Whenever you need to get the current time, or want to pause the current goroutine (sleep), please consider using this interface
func NewTimelineProvider ¶
func NewTimelineProvider() TimelineProvider
NewTimelineProvider creates a new TimelineProvider
Click to show internal directories.
Click to hide internal directories.