| // 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. |
| |
| package syncbase |
| |
| import "time" |
| |
| // DevModeUpdateVClockOpts specifies what DevModeUpdateVClock should do, as |
| // described below. |
| type DevModeUpdateVClockOpts struct { |
| // If specified, sets the NTP host to talk to for subsequent NTP requests. |
| NtpHost string |
| // If Now is specified, the fake system clock is updated to the given values |
| // of Now and ElapsedTime. If Now is not specified (i.e. takes the zero |
| // value), the system clock is not touched by DevModeUpdateVClock. |
| Now time.Time |
| ElapsedTime time.Duration |
| // If specified, the clock daemon's local and/or NTP update code is triggered |
| // after applying the updates specified by the fields above. (Helpful because |
| // otherwise these only run periodically.) These functions work even if the |
| // clock daemon hasn't been started. |
| DoNtpUpdate bool |
| DoLocalUpdate bool |
| } |