3 releases

Uses old Rust 2015

0.1.2 Apr 30, 2015
0.1.1 Apr 26, 2015
0.1.0 Apr 26, 2015

#19 in #ms

Download history 152/week @ 2024-11-14 95/week @ 2024-11-21 152/week @ 2024-11-28 177/week @ 2024-12-05 176/week @ 2024-12-12 44/week @ 2024-12-19 22/week @ 2024-12-26 48/week @ 2025-01-02 68/week @ 2025-01-09 78/week @ 2025-01-16 67/week @ 2025-01-23 118/week @ 2025-01-30 263/week @ 2025-02-06 108/week @ 2025-02-13 121/week @ 2025-02-20 113/week @ 2025-02-27

650 downloads per month
Used in fewer than 9 crates

Apache-2.0

5KB

Timebomb

Build Status

This is a simple timeout mechanism for Rust that is intended for use with unit tests.

extern crate timebomb;
use timebomb::timeout_ms;

#[test]
fn something_bad() {
	// This will timeout in 1 second if the test did not pass
	timeout_ms(|| {
		// oops infinite loop
		loop {}
	}, 1000);
}

Dependencies

~1–1.3MB
~19K SLoC