Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9623dd50 authored by Armelle Laine's avatar Armelle Laine Committed by Automerger Merge Worker
Browse files

Merge "libs: binder: trusty: binder_rpc_test to use CLOCK_BOOTTIME" into main...

Merge "libs: binder: trusty: binder_rpc_test to use CLOCK_BOOTTIME" into main am: a5e6d4e4 am: 15d2ce32

Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/3281814



Change-Id: Ie3ae8ab3efa3b212a74180cf5eb84763e65f601c
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents de1a797f 15d2ce32
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@ use binder::{BinderFeatures, IBinder, Status, StatusCode, Strong};
use binder_rpc_test_aidl::aidl::IBinderRpcSession::{BnBinderRpcSession, IBinderRpcSession};
use binder_rpc_test_aidl::aidl::IBinderRpcTest::{BnBinderRpcTest, IBinderRpcTest};
use binder_rpc_test_session::MyBinderRpcSession;
use libc::{clock_gettime, CLOCK_REALTIME};
use libc::{clock_gettime, CLOCK_BOOTTIME};
use rpcbinder::RpcSession;
use trusty_std::ffi::{CString, FallibleCString};

@@ -56,7 +56,7 @@ fn get_time_ns() -> u64 {
    let mut ts = libc::timespec { tv_sec: 0, tv_nsec: 0 };

    // Safety: Passing valid pointer to variable ts which lives past end of call
    assert_eq!(unsafe { clock_gettime(CLOCK_REALTIME, &mut ts) }, 0);
    assert_eq!(unsafe { clock_gettime(CLOCK_BOOTTIME, &mut ts) }, 0);

    ts.tv_sec as u64 * 1_000_000_000u64 + ts.tv_nsec as u64
}