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

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

#454 in Testing

Download history 3317/week @ 2024-08-07 2152/week @ 2024-08-14 2556/week @ 2024-08-21 1715/week @ 2024-08-28 2405/week @ 2024-09-04 2226/week @ 2024-09-11 2300/week @ 2024-09-18 2444/week @ 2024-09-25 2576/week @ 2024-10-02 3327/week @ 2024-10-09 2963/week @ 2024-10-16 3554/week @ 2024-10-23 1830/week @ 2024-10-30 2068/week @ 2024-11-06 2622/week @ 2024-11-13 3408/week @ 2024-11-20

10,719 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