#control-flow #mimic #time #deterministic #fake #clock

sn_fake_clock

Fake clock for deterministic testing of code depending on time

15 releases

0.4.14 Jun 9, 2021
0.4.13 Mar 3, 2021
0.4.11 Feb 25, 2021
0.4.9 Jan 20, 2021
0.4.2 Sep 17, 2020

#447 in Testing

Download history 2055/week @ 2024-07-23 2328/week @ 2024-07-30 3232/week @ 2024-08-06 2190/week @ 2024-08-13 2680/week @ 2024-08-20 1567/week @ 2024-08-27 2451/week @ 2024-09-03 2034/week @ 2024-09-10 2528/week @ 2024-09-17 2552/week @ 2024-09-24 2446/week @ 2024-10-01 3321/week @ 2024-10-08 2800/week @ 2024-10-15 3363/week @ 2024-10-22 2239/week @ 2024-10-29 2075/week @ 2024-11-05

11,086 downloads per month
Used in 4 crates

MIT OR BSD-3-Clause

11KB
207 lines

sn_fake_clock

Crate Documentation
Documentation
MaidSafe website SAFE Dev Forum SAFE Network Forum

Overview

This crate supplies a FakeClock struct, which mimics the interface of std::time::Instant and enables full control over the flow of time as perceived by the code during testing.

License

This SAFE Network library is dual-licensed under the Modified BSD (LICENSE-BSD https://opensource.org/licenses/BSD-3-Clause) or the MIT license (LICENSE-MIT http://opensource.org/licenses/MIT) at your option.

Contributing

Want to contribute? Great 🎉

There are many ways to give back to the project, whether it be writing new code, fixing bugs, or just reporting errors. All forms of contributions are encouraged!

For instructions on how to contribute, see our Guide to contributing.

No runtime deps