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 + dur.subsec_nanos() as f64 / NANOS_PER_SEC;
10 #[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, RustcEncodable, RustcDecodable)]
11 pub enum NativeLibraryKind {
12 /// native static library (.a archive)
14 /// native static library, which doesn't get bundled into .rlibs
18 /// Windows dynamic library without import library.
20 /// default way to specify a dynamic library
24 rustc_data_structures::impl_stable_hash_via_hash!(NativeLibraryKind);