From 698f8c2f01ea549d77d7dc3338a12e04c11057b9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:02:58 +0200 Subject: Adding upstream version 1.64.0+dfsg1. Signed-off-by: Daniel Baumann --- vendor/rustix/examples/time.rs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 vendor/rustix/examples/time.rs (limited to 'vendor/rustix/examples/time.rs') diff --git a/vendor/rustix/examples/time.rs b/vendor/rustix/examples/time.rs new file mode 100644 index 000000000..3648336a7 --- /dev/null +++ b/vendor/rustix/examples/time.rs @@ -0,0 +1,20 @@ +//! A command which prints the current values of the realtime and monotonic +//! clocks it's given. + +#[cfg(not(windows))] +#[cfg(feature = "time")] +fn main() { + println!( + "Real time: {:?}", + rustix::time::clock_gettime(rustix::time::ClockId::Realtime) + ); + println!( + "Monotonic time: {:?}", + rustix::time::clock_gettime(rustix::time::ClockId::Monotonic) + ); +} + +#[cfg(any(windows, not(feature = "time")))] +fn main() { + unimplemented!() +} -- cgit v1.2.3