mirror of
https://github.com/prometheus/node_exporter.git
synced 2024-11-23 20:36:21 +01:00
chore:remove constant from function (#2884)
Signed-off-by: tyltr <tylitianrui@126.com>
This commit is contained in:
parent
94ddad4dec
commit
34467b1d7a
@ -38,6 +38,9 @@ const (
|
|||||||
// 1 second in
|
// 1 second in
|
||||||
nanoSeconds = 1000000000
|
nanoSeconds = 1000000000
|
||||||
microSeconds = 1000000
|
microSeconds = 1000000
|
||||||
|
|
||||||
|
// See NOTES in adjtimex(2).
|
||||||
|
ppm16frac = 1000000.0 * 65536.0
|
||||||
)
|
)
|
||||||
|
|
||||||
type timexCollector struct {
|
type timexCollector struct {
|
||||||
@ -183,8 +186,6 @@ func (c *timexCollector) Update(ch chan<- prometheus.Metric) error {
|
|||||||
} else {
|
} else {
|
||||||
divisor = microSeconds
|
divisor = microSeconds
|
||||||
}
|
}
|
||||||
// See NOTES in adjtimex(2).
|
|
||||||
const ppm16frac = 1000000.0 * 65536.0
|
|
||||||
|
|
||||||
ch <- c.syncStatus.mustNewConstMetric(syncStatus)
|
ch <- c.syncStatus.mustNewConstMetric(syncStatus)
|
||||||
ch <- c.offset.mustNewConstMetric(float64(timex.Offset) / divisor)
|
ch <- c.offset.mustNewConstMetric(float64(timex.Offset) / divisor)
|
||||||
|
Loading…
Reference in New Issue
Block a user