mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-03-14 22:29:15 +01:00
[util] Rename getFrequency, getCounter -> get_frequency, get_counter
To be consistent with STL naming conventions
This commit is contained in:
parent
1c1dba4624
commit
8921f62539
@ -20,8 +20,8 @@ namespace dxvk {
|
|||||||
|
|
||||||
static inline time_point now() noexcept {
|
static inline time_point now() noexcept {
|
||||||
// Keep the frequency static, this doesn't change at all.
|
// Keep the frequency static, this doesn't change at all.
|
||||||
static const int64_t freq = getFrequency();
|
static const int64_t freq = get_frequency();
|
||||||
const int64_t counter = getCounter();
|
const int64_t counter = get_counter();
|
||||||
|
|
||||||
const int64_t whole = (counter / freq) * period::den;
|
const int64_t whole = (counter / freq) * period::den;
|
||||||
const int64_t part = (counter % freq) * period::den / freq;
|
const int64_t part = (counter % freq) * period::den / freq;
|
||||||
@ -29,14 +29,14 @@ namespace dxvk {
|
|||||||
return time_point(duration(whole + part));
|
return time_point(duration(whole + part));
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int64_t getFrequency() {
|
static inline int64_t get_frequency() {
|
||||||
LARGE_INTEGER freq;
|
LARGE_INTEGER freq;
|
||||||
QueryPerformanceFrequency(&freq);
|
QueryPerformanceFrequency(&freq);
|
||||||
|
|
||||||
return freq.QuadPart;
|
return freq.QuadPart;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int64_t getCounter() {
|
static inline int64_t get_counter() {
|
||||||
LARGE_INTEGER count;
|
LARGE_INTEGER count;
|
||||||
QueryPerformanceCounter(&count);
|
QueryPerformanceCounter(&count);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user