mirror of
https://github.com/pion/ice.git
synced 2026-04-22 16:17:11 +08:00
Make linter happy
This commit is contained in:
committed by
Joe Turki
parent
945cf9fe3b
commit
e5a0d2a0b3
+4
-3
@@ -48,15 +48,16 @@ type candidateBase struct {
|
||||
extensions []CandidateExtension
|
||||
}
|
||||
|
||||
// Save a time reference to calculate monotonic time for candidate last sent/received
|
||||
// Save a time reference to calculate monotonic time for candidate last sent/received.
|
||||
// nolint: gochecknoglobals
|
||||
var timeRef = time.Now()
|
||||
|
||||
// getMonoNanos returns the monotonic nanoseconds of a time t since timeRef
|
||||
// getMonoNanos returns the monotonic nanoseconds of a time t since timeRef.
|
||||
func getMonoNanos(t time.Time) int64 {
|
||||
return t.Sub(timeRef).Nanoseconds()
|
||||
}
|
||||
|
||||
// getMonoTime returns a time.Time based on monotonic nanos since timeRef
|
||||
// getMonoTime returns a time.Time based on monotonic nanos since timeRef.
|
||||
func getMonoTime(nanos int64) time.Time {
|
||||
return timeRef.Add(time.Duration(nanos))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user