blob: 110dbc163a3e96427550d76dbd13e210c2f54e4f [file] [log] [blame]
// Copyright 2015 The Vanadium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// This file was auto-generated by the vanadium vdl tool.
// Source: types.vdl
package clock
import (
// VDL system imports
"v.io/v23/vdl"
// VDL user imports
"time"
_ "v.io/v23/vdlroot/time"
)
// ClockData is the persistent state of syncbase clock used to estimate current
// NTP time and catch any unexpected changes to system clock.
type ClockData struct {
// UTC time in unix nano seconds obtained from system clock at boot.
SystemTimeAtBoot int64
// Skew in nanoseconds between the system clock and NTP time.
Skew int64
// The elapsed time in nanoseconds since boot as last seen during a run of
// clockservice. This is used to determine if the device rebooted since the
// last run of clockservice.
ElapsedTimeSinceBoot int64
// Timestamp received from NTP during last NTP sync. The last NTP sync could
// be done either by this device or some other device that this device
// synced its clock with.
LastNtpTs *time.Time
// Number of cumulative reboots since last NTP sync. If the LastNtpTs was
// received from a peer device then this field represents the number
// of reboots on that device since it did NTP and the number of reboots
// on this device since syncing with the peer device.
NumReboots uint16
// Number of hops between this device and the device that did the last
// NTP sync.
NumHops uint16
}
func (ClockData) __VDLReflect(struct {
Name string `vdl:"v.io/x/ref/services/syncbase/clock.ClockData"`
}) {
}
func init() {
vdl.Register((*ClockData)(nil))
}