tree: 6af383e05826cdc0374b48e617d9588298ae2564 [path history] [tgz]
  1. src/
  2. .cargo-checksum.json
  3. Cargo.toml
  4. LICENSE
  5. Readme.md
third_party/rust_crates/vendor/timebomb/Readme.md

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