message update

This commit is contained in:
Gordon
2021-08-06 14:56:41 +08:00
parent bfc28cab8a
commit b36c041d35
6 changed files with 43 additions and 19 deletions
+5
View File
@@ -26,6 +26,11 @@ func UnixSecondToTime(second int64) time.Time {
return time.Unix(second, 0)
}
//Convert nano timestamp to time.Time type
func UnixNanoSecondToTime(nanoSecond int64) time.Time {
return time.Unix(0, nanoSecond)
}
//Get the current timestamp by Nano
func GetCurrentTimestampByNano() int64 {
return time.Now().UnixNano()