mirror of
https://github.com/dingusdev/dingusppc.git
synced 2024-12-22 15:29:58 +00:00
Fixes issue #97
This commit is contained in:
parent
5eaff7a8ce
commit
17cdcc5560
@ -327,7 +327,7 @@ void ppc_main_opcode()
|
||||
OpcodeGrabber[(ppc_cur_instruction >> 26) & 0x3F]();
|
||||
}
|
||||
|
||||
long long now_ns() {
|
||||
long long cpu_now_ns() {
|
||||
#ifdef __APPLE__
|
||||
return ConvertHostTimeToNanos2(mach_absolute_time());
|
||||
#else
|
||||
@ -339,7 +339,7 @@ long long now_ns() {
|
||||
uint64_t get_virt_time_ns()
|
||||
{
|
||||
if (g_realtime) {
|
||||
return now_ns() - g_nanoseconds_base;
|
||||
return cpu_now_ns() - g_nanoseconds_base;
|
||||
} else {
|
||||
return g_icycles << icnt_factor;
|
||||
}
|
||||
@ -898,7 +898,7 @@ void ppc_cpu_init(MemCtrlBase* mem_ctrl, uint32_t cpu_version, bool include_601,
|
||||
#ifdef __APPLE__
|
||||
mach_timebase_info(&timebase_info);
|
||||
#endif
|
||||
g_nanoseconds_base = now_ns();
|
||||
g_nanoseconds_base = cpu_now_ns();
|
||||
g_icycles_base = 0;
|
||||
g_icycles = 0;
|
||||
//icnt_factor = 6;
|
||||
|
6
thirdparty/loguru/loguru.cpp
vendored
6
thirdparty/loguru/loguru.cpp
vendored
@ -515,7 +515,7 @@ namespace loguru
|
||||
argv[argc] = nullptr;
|
||||
}
|
||||
|
||||
static long long now_ns()
|
||||
static long long loguru_now_ns()
|
||||
{
|
||||
return duration_cast<nanoseconds>(high_resolution_clock::now().time_since_epoch()).count();
|
||||
}
|
||||
@ -1578,7 +1578,7 @@ namespace loguru
|
||||
}
|
||||
}
|
||||
#if LOGURU_VERBOSE_SCOPE_ENDINGS
|
||||
auto duration_sec = static_cast<double>(now_ns() - _start_time_ns) / 1e9;
|
||||
auto duration_sec = static_cast<double>(loguru_now_ns() - _start_time_ns) / 1e9;
|
||||
#if LOGURU_USE_FMTLIB
|
||||
auto buff = textprintf("{:.{}f} s: {:s}", duration_sec, LOGURU_SCOPE_TIME_PRECISION, _name);
|
||||
#else
|
||||
@ -1596,7 +1596,7 @@ namespace loguru
|
||||
if (_verbosity <= current_verbosity_cutoff()) {
|
||||
std::lock_guard<std::recursive_mutex> lock(s_mutex);
|
||||
_indent_stderr = (_verbosity <= g_stderr_verbosity);
|
||||
_start_time_ns = now_ns();
|
||||
_start_time_ns = loguru_now_ns();
|
||||
vsnprintf(_name, sizeof(_name), format, vlist);
|
||||
log_to_everywhere(1, _verbosity, _file, _line, "{ ", _name);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user