Utility timestamp_ns() fix (#175)
* Update lib/common/utility.*
- fix timestamp_ns()
* Update samples/**/CMakeLists.txt
- fail test if exception thrown
* source formatting (clang-format v11) (#176)
Co-authored-by: jrmadsen <jrmadsen@users.noreply.github.com>
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
[ROCm/rocprofiler-sdk commit: 7a8931e57f]
Este commit está contenido en:
cometido por
GitHub
padre
ceb63cfcc5
commit
c8bb0520c6
@@ -90,7 +90,7 @@ get_accurate_clock_id_impl()
|
||||
}
|
||||
|
||||
uint64_t
|
||||
get_clock_freq_ns_impl(clockid_t _clk_id)
|
||||
get_clock_period_ns_impl(clockid_t _clk_id)
|
||||
{
|
||||
constexpr auto nanosec = std::nano::den;
|
||||
|
||||
@@ -110,9 +110,7 @@ get_clock_freq_ns_impl(clockid_t _clk_id)
|
||||
<< ") returned very low frequency (<1Hz)";
|
||||
}
|
||||
|
||||
auto&& _period =
|
||||
(static_cast<uint64_t>(ts.tv_sec) * nanosec) + static_cast<uint64_t>(ts.tv_nsec);
|
||||
return nanosec / _period;
|
||||
return (static_cast<uint64_t>(ts.tv_sec) * nanosec) + static_cast<uint64_t>(ts.tv_nsec);
|
||||
}
|
||||
|
||||
std::vector<std::string>
|
||||
|
||||
Referencia en una nueva incidencia
Block a user