From 161f16d4260c67c8dc0f5a8281922630fd0c216a Mon Sep 17 00:00:00 2001 From: Riccardo Zaglia Date: Wed, 17 May 2023 12:32:50 +0800 Subject: [PATCH] Remove Pico workarounds --- alvr/client_openxr/src/lib.rs | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/alvr/client_openxr/src/lib.rs b/alvr/client_openxr/src/lib.rs index 7827118c77..6d5174669c 100644 --- a/alvr/client_openxr/src/lib.rs +++ b/alvr/client_openxr/src/lib.rs @@ -905,21 +905,7 @@ pub fn entry_point() { #[allow(unused)] fn xr_runtime_now(xr_instance: &xr::Instance, platform: Platform) -> Option { - let time_nanos = { - #[cfg(target_os = "android")] - if platform == Platform::Pico { - let mut ts_now = libc::timespec { - tv_sec: 0, - tv_nsec: 0, - }; - unsafe { libc::clock_gettime(libc::CLOCK_MONOTONIC, &mut ts_now) }; - ts_now.tv_sec * 1_000_000_000 + ts_now.tv_nsec - } else { - xr_instance.now().ok()?.as_nanos() - } - #[cfg(not(target_os = "android"))] - xr_instance.now().ok()?.as_nanos() - }; + let time_nanos = xr_instance.now().ok()?.as_nanos(); (time_nanos > 0).then(|| Duration::from_nanos(time_nanos as _)) } @@ -929,14 +915,7 @@ fn xr_runtime_now(xr_instance: &xr::Instance, platform: Platform) -> Option