style: Document the timer module.

This commit is contained in:
Emilio Cobos Álvarez 2016-12-31 03:38:23 +01:00
parent 5e52184278
commit 5007e66043
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C

View file

@ -1,14 +1,19 @@
/* This Source Code Form is subject to the terms of the Mozilla Public /* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#![deny(missing_docs)]
//! A timer module, used to define a `Timer` type, that is controlled by script.
use time; use time;
/// The `TimerMode` is used to determine what time should the `Timer` return, /// The `TimerMode` is used to determine what time should the `Timer` return.
/// either a fixed value (in the `Test` mode), or the actual time (in the
/// `Current` mode).
#[derive(Debug, Clone)] #[derive(Debug, Clone)]
enum TimerMode { enum TimerMode {
/// The timer should return a fixed value.
Test(f64), Test(f64),
/// The timer should return the actual time.
Current, Current,
} }