Commit cd95969 1 parent ae44875 commit cd95969 Copy full SHA for cd95969
File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -11,15 +11,15 @@ import (
11
11
)
12
12
13
13
func GetCurrentNTPTimestamp () uint64 {
14
- ntpEpochOffset : = 2208988800 // Offset from Unix epoch (January 1, 1970) to NTP epoch (January 1, 1900)
14
+ var ntpEpochOffset int64 = 2208988800 // Offset from Unix epoch (January 1, 1970) to NTP epoch (January 1, 1900)
15
15
currentTime := time .Now ().Unix () + int64 (ntpEpochOffset )
16
16
17
17
return uint64 (currentTime )
18
18
}
19
19
20
20
func NTPTimestamp (now time.Time ) uint64 {
21
- ntpEpochOffset : = 2208988800 // Offset from Unix epoch (January 1, 1970) to NTP epoch (January 1, 1900)
22
- currentTime := now .Unix () + int64 ( ntpEpochOffset )
21
+ var ntpEpochOffset int64 = 2208988800 // Offset from Unix epoch (January 1, 1970) to NTP epoch (January 1, 1900)
22
+ currentTime := now .Unix () + ntpEpochOffset
23
23
24
24
return uint64 (currentTime )
25
25
}
You can’t perform that action at this time.
0 commit comments