Jatin Lodhia | d70777b | 2015-08-19 16:59:47 -0700 | [diff] [blame] | 1 | // Copyright 2015 The Vanadium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style |
| 3 | // license that can be found in the LICENSE file. |
| 4 | |
| 5 | package clock |
| 6 | |
| 7 | // ClockData is the persistent state of syncbase clock used to estimate current |
| 8 | // NTP time and catch any unexpected changes to system clock. |
| 9 | type ClockData struct { |
| 10 | // UTC time in unix nano seconds obtained from system clock at boot. |
| 11 | SystemTimeAtBoot int64 |
| 12 | |
| 13 | // Skew between the system clock and NTP time. |
| 14 | Skew int64 |
| 15 | |
| 16 | // The elapsed time since boot as last seen during a run of clockservice. |
| 17 | // This is used to determine if the device rebooted since the last run of |
| 18 | // clockservice. |
| 19 | ElapsedTimeSinceBoot int64 |
| 20 | } |