Add support to get clock for new architecture CSKY (#1400)

it's like what loongarch does to get cycle clock for CSKY by gettimeofday function.
This commit is contained in:
Zi Xuan Wu (Zeson) 2022-05-23 18:47:58 +08:00 committed by GitHub
parent 37be1e8252
commit 6c46c9f593
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -173,7 +173,7 @@ 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__)
#elif defined(__loongarch__) || defined(__csky__)
struct timeval tv;
gettimeofday(&tv, nullptr);
return static_cast<int64_t>(tv.tv_sec) * 1000000 + tv.tv_usec;