0
0
mirror of https://github.com/yse/easy_profiler.git synced 2024-12-25 23:40:51 +08:00

Merge pull request #208 from zhaohuijun/develop

fix: ticks2ns
This commit is contained in:
Sergey Yagovtsev 2024-11-23 10:44:34 +03:00 committed by GitHub
commit c863641968
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1300,7 +1300,7 @@ profiler::timestamp_t ProfileManager::ticks2us(profiler::timestamp_t ticks) cons
#else #else
profiler::timestamp_t ProfileManager::ticks2ns(profiler::timestamp_t ticks) const profiler::timestamp_t ProfileManager::ticks2ns(profiler::timestamp_t ticks) const
{ {
return static_cast<profiler::timestamp_t>(ticks / m_cpuFrequency.load(std::memory_order_acquire)); return static_cast<profiler::timestamp_t>(ticks * 1000000LL / m_cpuFrequency.load(std::memory_order_acquire));
} }
profiler::timestamp_t ProfileManager::ticks2us(profiler::timestamp_t ticks) const profiler::timestamp_t ProfileManager::ticks2us(profiler::timestamp_t ticks) const