| // Copyright 2021 The Fuchsia Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| library fuchsia.fakeclock.test; |
| using zx; |
| |
| /// An example protocol for demonstrating fake time. |
| @discoverable |
| closed protocol Example { |
| /// Gets the current monotonic time. |
| strict GetMonotonic() -> (struct { |
| time zx.Time; |
| }); |
| /// Wait until the given absolute time, then return. |
| strict WaitUntil(struct { |
| timeout zx.Time; |
| }) -> (); |
| /// Wait for `duration` time, then return. |
| strict WaitFor(struct { |
| duration zx.Duration; |
| }) -> (); |
| }; |