mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-04 05:51:27 +12:00
std::chrono cleanup: always use steady_clock
This commit is contained in:
parent
12a48fc6d1
commit
aa3aef4beb
19 changed files with 96 additions and 97 deletions
|
@ -17,6 +17,10 @@
|
|||
#include <limits>
|
||||
#include <array>
|
||||
|
||||
using std::chrono::steady_clock;
|
||||
|
||||
using namespace std::literals;
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#if !defined(__cpp_lib_bitops) && _MSC_VER < 1928
|
||||
#define __cpp_lib_bitops
|
||||
|
@ -43,9 +47,6 @@
|
|||
#define CHECK_MAX_SIZE(type, size) static_assert(sizeof(type) <= size, #type " type size is too big")
|
||||
#define CHECK_SIZE_ALIGN(type, size, align) CHECK_SIZE(type, size); CHECK_ALIGN(type, align)
|
||||
|
||||
// Variant pattern matching helper
|
||||
#define MATCH(arg, ...) constexpr(std::is_same_v<std::decay_t<decltype(arg)>, __VA_ARGS__>)
|
||||
|
||||
#define DECLARE(...) decltype(__VA_ARGS__) __VA_ARGS__
|
||||
|
||||
#define STR_CASE(...) case __VA_ARGS__: return #__VA_ARGS__
|
||||
|
@ -149,10 +150,6 @@ namespace std
|
|||
}
|
||||
#endif
|
||||
|
||||
using steady_clock = std::conditional<
|
||||
std::chrono::high_resolution_clock::is_steady,
|
||||
std::chrono::high_resolution_clock, std::chrono::steady_clock>::type;
|
||||
|
||||
// Get integral type from type size
|
||||
template <std::size_t N>
|
||||
struct get_int_impl
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue