1 // Hack up our own formatting for the duration to make it easier for scripts
2 // to parse (always use the same number of decimal places and the same unit).
3 pub fn duration_to_secs_str(dur: std::time::Duration) -> String {
4 const NANOS_PER_SEC: f64 = 1_000_000_000.0;
5 let secs = dur.as_secs() as f64 +
6 dur.subsec_nanos() as f64 / NANOS_PER_SEC;
11 #[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, RustcEncodable, RustcDecodable)]
12 pub enum NativeLibraryKind {
13 /// native static library (.a archive)
15 /// native static library, which doesn't get bundled into .rlibs
19 /// Windows dynamic library without import library.
21 /// default way to specify a dynamic library
25 rustc_data_structures::impl_stable_hash_via_hash!(NativeLibraryKind);