[go: up one dir, main page]

Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Timebomb
========

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

```rust
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);
}
```