summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Willcox <jwillcox@google.com>2023-11-08 18:12:42 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2023-11-08 18:12:42 +0000
commit464c7d3d2b5d182d35335a98513f8e45ef013b5b (patch)
tree37c826815a0b1bac7c64c46081ecfedf59b3b5b9
parentf1aba2721cf5e7c43bdaca32cf92c98db83feb79 (diff)
parent80f7be151602e128b885c82291d527af5ff65511 (diff)
downloadsecurity-464c7d3d2b5d182d35335a98513f8e45ef013b5b.tar.gz
Merge "Use CLOCK_BOOTTIME for keystore2 auth token received time" into main
-rw-r--r--keystore2/src/utils.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/keystore2/src/utils.rs b/keystore2/src/utils.rs
index f028491a..4fd9c8dd 100644
--- a/keystore2/src/utils.rs
+++ b/keystore2/src/utils.rs
@@ -269,7 +269,7 @@ pub fn get_current_time_in_milliseconds() -> i64 {
let mut current_time = libc::timespec { tv_sec: 0, tv_nsec: 0 };
// SAFETY: The pointer is valid because it comes from a reference, and clock_gettime doesn't
// retain it beyond the call.
- unsafe { libc::clock_gettime(libc::CLOCK_MONOTONIC_RAW, &mut current_time) };
+ unsafe { libc::clock_gettime(libc::CLOCK_BOOTTIME, &mut current_time) };
current_time.tv_sec as i64 * 1000 + (current_time.tv_nsec as i64 / 1_000_000)
}