Skip to content

Commit

Permalink
Add support for new architecture loongarch (#1173)
Browse files Browse the repository at this point in the history
  • Loading branch information
huajingyun01 authored Jun 8, 2021
1 parent 3424091 commit f90215f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/cycleclock.h
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,10 @@ inline BENCHMARK_ALWAYS_INLINE int64_t Now() {
struct timeval tv;
gettimeofday(&tv, nullptr);
return static_cast<int64_t>(tv.tv_sec) * 1000000 + tv.tv_usec;
#elif defined(__loongarch__)
struct timeval tv;
gettimeofday(&tv, nullptr);
return static_cast<int64_t>(tv.tv_sec) * 1000000 + tv.tv_usec;
#elif defined(__s390__) // Covers both s390 and s390x.
// Return the CPU clock.
uint64_t tsc;
Expand Down

0 comments on commit f90215f

Please sign in to comment.