Skip to content

Commit d406bfd

Browse files
Milad FarazmandCommit Bot
authored andcommitted
[base] Fix the return of ClockNow on IBMi
The API thread_cputime() is only defined but not yet implemented on IBMi. Change-Id: I8ea7ff724e749f537b54e75a00d718500807ca8a Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1957831 Reviewed-by: Junliang Yan <[email protected]> Reviewed-by: Clemens Backes <[email protected]> Commit-Queue: Milad Farazmand <[email protected]> Cr-Commit-Position: refs/heads/master@{#65392}
1 parent fffea68 commit d406bfd

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/base/platform/time.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ V8_INLINE int64_t ClockNow(clockid_t clk_id) {
7070
#if defined(V8_OS_AIX)
7171
thread_cputime_t tc;
7272
if (clk_id == CLOCK_THREAD_CPUTIME_ID) {
73+
#if defined(__PASE__) // CLOCK_THREAD_CPUTIME_ID clock not supported on IBMi
74+
return 0;
75+
#endif
7376
if (thread_cputime(-1, &tc) != 0) {
7477
UNREACHABLE();
7578
}

0 commit comments

Comments
 (0)