2 unstable releases

0.5.0 Apr 29, 2023
0.4.0 Nov 5, 2019

#407 in Testing

Download history 109/week @ 2023-11-07 169/week @ 2023-11-14 171/week @ 2023-11-21 203/week @ 2023-11-28 169/week @ 2023-12-05 124/week @ 2023-12-12 111/week @ 2023-12-19 99/week @ 2023-12-26 168/week @ 2024-01-02 167/week @ 2024-01-09 118/week @ 2024-01-16 138/week @ 2024-01-23 112/week @ 2024-01-30 214/week @ 2024-02-06 227/week @ 2024-02-13 256/week @ 2024-02-20

829 downloads per month
Used in 3 crates

MIT OR BSD-3-Clause

12KB
212 lines

fake_instant

crates.io docs.rs gh-actions CI

This crate supplies a FakeInstant 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 (former) 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.

Contribution

Copyrights in the SAFE Network are retained by their contributors. No copyright assignment is required to contribute to this project.


lib.rs:

fake_clock

A crate providing a virtual clock mimicking std::time::Instant's interface, enabling full control over the flow of time during testing.

No runtime deps