| // 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. |
| // These routines are used by external tests. |
| // SetServerListClock sets up an alternate clock. |
| func SetServerListClock(x serverListClock) { |
| // DefaultMaxNodesPerUser returns the maximum number of nodes per user. |
| func DefaultMaxNodesPerUser() int { |
| return defaultMaxNodesPerUser |
| func NewFakeTimeClock() *fakeTime { |
| return &fakeTime{theTime: now} |
| func (ft *fakeTime) Now() time.Time { |
| func (ft *fakeTime) Advance(d time.Duration) { |
| ft.theTime = ft.theTime.Add(d) |