3 releases

Uses old Rust 2015

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

#17 in #ms

Download history 71/week @ 2024-03-11 88/week @ 2024-03-18 134/week @ 2024-03-25 148/week @ 2024-04-01 56/week @ 2024-04-08 76/week @ 2024-04-15 79/week @ 2024-04-22 61/week @ 2024-04-29 64/week @ 2024-05-06 79/week @ 2024-05-13 63/week @ 2024-05-20 106/week @ 2024-05-27 81/week @ 2024-06-03 70/week @ 2024-06-10 114/week @ 2024-06-17 83/week @ 2024-06-24

357 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

~0.9–1.3MB
~18K SLoC