mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-30 02:52:10 +01:00
[util] Implement get_frequency + get_counter on non-Windows platforms
This commit is contained in:
parent
8921f62539
commit
9610e29a65
@ -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
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user