timestamp.go
timestamp.go - Overview
-
Overview This file provides utility functions for converting between
time.Time
objects and millisecond timestamps (int64). -
Detailed Documentation
FromTime
- Purpose: Converts a
time.Time
object to a millisecond timestamp (int64). - Parameters:
t
(time.Time): The time object to convert.
- Returns:
int64
: The millisecond timestamp representing the time.
Time
- Purpose: Converts a millisecond timestamp (int64) to a
time.Time
object. - Parameters:
ts
(int64): The millisecond timestamp to convert.
- Returns:
time.Time
: Thetime.Time
object representing the timestamp.
Include in Getting Started: NO