[util] Implement get_frequency + get_counter on non-Windows platforms

This commit is contained in:
Joshua Ashton 2022-08-21 20:20:25 +00:00 committed by Philip Rebohle
parent 8921f62539
commit 9610e29a65
1 changed files with 9 additions and 1 deletions

View File

@ -44,7 +44,15 @@ namespace dxvk {
}
};
#else
using high_resolution_clock = std::chrono::high_resolution_clock;
struct high_resolution_clock : public std::chrono::high_resolution_clock {
static inline int64_t get_frequency() {
return period::den;
}
static inline int64_t get_counter() {
return dxvk::high_resolution_clock::now().time_since_epoch().count();
}
};
#endif
}