1 // Copyright 2016 The Fuchsia Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 extern crate fuchsia_zircon_sys as zircon_sys; 6 main()7pub fn main() { 8 let time = unsafe { zircon_sys::zx_time_get(zircon_sys::ZX_CLOCK_MONOTONIC) }; 9 println!("before sleep, time = {}", time); 10 unsafe { zircon_sys::zx_nanosleep(zircon_sys::zx_deadline_after(1000_000_000)); } 11 let time = unsafe { zircon_sys::zx_time_get(zircon_sys::ZX_CLOCK_MONOTONIC) }; 12 println!("after sleep, time = {}", time); 13 } 14 15