Skip to content

Commit 17cbef5

Browse files
authored
Fix timespec_get not compatiable for AOSP OS Android N14
Differential Revision: D73136434 Pull Request resolved: #10240
1 parent 3410cfe commit 17cbef5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

extension/llm/runner/util.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ ET_EXPERIMENTAL void inline safe_printf(const char* piece) {
6868
ET_EXPERIMENTAL long inline time_in_ms() {
6969
// return time in milliseconds, for benchmarking the model speed
7070
struct timespec time;
71-
// The `timespec_get` function is only available on Android API levels
72-
// 29 or later.
73-
#if defined(__ANDROID_API__) && __ANDROID_API__ < 29
71+
// The `timespec_get` function is for windows time access. Some AOSP OS does
72+
// not have timespec_get support.
73+
#if defined(__ANDROID_API__)
7474
clock_gettime(CLOCK_REALTIME, &time);
7575
#else
7676
timespec_get(&time, TIME_UTC);

0 commit comments

Comments
 (0)