mirror of https://github.com/google/benchmark.git
Add support for new architecture loongarch (#1173)
This commit is contained in:
parent
342409126b
commit
f90215f1cc
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue