Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ This crate provides two variant implementations of this four level wheel structu
- The `wheels::cancellable::QuadWheelWithOverflow` additionally supports the cancellation of outstanding timers before they expire. In order to do so, however, it requires the generic timer entry type to provide a unique identifier field. It also uses `std::rc::Rc` internally to avoid double storing the actual entry, which makes it (potentially) unsuitable for situations where the timer must be able to move between threads.

### 3 – High Level APIs
This crate also provides two high levels APIs that can either be used directly or can be seen as examples of how to use the lower level APIs in an application.
This crate also provides three high-level APIs that can either be used directly or can be seen as examples of how to use the lower level APIs in an application.

Both higher level APIs also offer built-in support for periodically repeating timers, in addition to the normal timers which are scheduled once and discarded once expired.
All higher-level APIs also offer built-in support for periodically repeating timers, in addition to the normal timers which are scheduled once and discarded once expired.

#### Simulation Timer
The `simulation` module provides an implementation for an event timer used to drive a discrete event simulation.
Expand All @@ -39,6 +39,9 @@ Its particular feature is that it can skip quickly through periods where no even
The `thread_timer` module provides a timer for real-time event scheduling with millisecond accuracy.
It runs on its own dedicated thread and uses a shareable handle called a `TimerRef` for communication with other threads.

#### Manual Timer
The `manual_timer` module provides the same queue-based scheduling API as the thread timer, but advances only when the caller explicitly steps time forward.

## Documentation

For reference and examples check the [API Docs](https://docs.rs/hierarchical_hash_wheel_timer).
Expand Down
2 changes: 1 addition & 1 deletion rustfmt.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ use_field_init_shorthand = false
force_explicit_abi = true
condense_wildcard_suffixes = false
color = "Auto"
required_version = "1.8.0"
required_version = "1.9.0"
unstable_features = false
disable_all_formatting = false
skip_children = false
Expand Down
19 changes: 15 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,13 @@
//! be able to move threads (since Rc](std::rc::Rc) is not `Send`).
//!
//! # 3 – High Level APIs
//! This crate also provides two high levels APIs that can either be used directly or can be seen as examples
//! of how to use the lower level APIs in an application.
//! This crate also provides three high-level APIs that can either be used
//! directly or can be seen as examples of how to use the lower level APIs in
//! an application.
//!
//! Bother higher level APIs also offer built-in support for periodically repeating timers, in addition to the normal timers
//! which are schedulled once and discarded once expired.
//! All higher-level APIs also offer built-in support for periodically
//! repeating timers, in addition to the normal timers which are scheduled once
//! and discarded once expired.
//!
//! ## Simulation Timer
//! The [simulation](simulation) module provides an implementation for an event timer used to drive a discrete event simulation.
Expand All @@ -46,6 +48,11 @@
//! ## Thread Timer
//! The [thread_timer](thread_timer) module provides a timer for real-time event schedulling with millisecond accuracy.
//! It runs on its own dedicated thread and uses a shareable handle called a `TimerRef` for communication with other threads.
//!
//! ## Manual Timer
//! The [manual_timer](manual_timer) module provides the same queue-based
//! scheduling API as the thread timer, but advances only when the caller
//! explicitly steps time forward.

#![deny(missing_docs)]

Expand All @@ -58,6 +65,10 @@ use wheels::{cancellable::CancellableTimerEntry, TimerEntryWithDelay};
mod timers;
pub use self::timers::*;

#[cfg(feature = "thread-timer")]
pub mod manual_timer;
#[cfg(feature = "thread-timer")]
mod queue_timer;
#[cfg(feature = "thread-timer")]
pub mod thread_timer;

Expand Down
Loading
Loading