-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexport_test.go
45 lines (35 loc) · 934 Bytes
/
export_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
package ntp
import (
"time"
"github.com/beevik/ntp"
)
// OutOfBoundsDuration -
const OutOfBoundsDuration = outOfBoundsDuration
// Query -
func (s *syncTime) Query() func(options NTPOptions, hostIndex int) (*ntp.Response, error) {
return s.query
}
// SyncPeriod -
func (s *syncTime) SyncPeriod() time.Duration {
return s.syncPeriod
}
// SetClockOffset -
func (s *syncTime) SetClockOffset(clockOffset time.Duration) {
s.setClockOffset(clockOffset)
}
// Sync -
func (s *syncTime) Sync() {
s.sync()
}
// GetClockOffsetsWithoutEdges -
func (s *syncTime) GetClockOffsetsWithoutEdges(clockOffsets []time.Duration) []time.Duration {
return s.getClockOffsetsWithoutEdges(clockOffsets)
}
// GetHarmonicMean -
func (s *syncTime) GetHarmonicMean(clockOffsets []time.Duration) time.Duration {
return s.getHarmonicMean(clockOffsets)
}
// GetSleepTime -
func (s *syncTime) GetSleepTime() time.Duration {
return s.getSleepTime()
}