mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-06 22:54:16 +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
|
#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
|
#endif
|
||||||
|
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user