Fix utils::get_tsc_freq() (#7974)

Use magic static for once-initialization
This commit is contained in:
Eladash
2020-04-07 11:02:12 +03:00
committed by GitHub
parent 4ff69dc0cd
commit 5834a466cd
+1 -1
View File
@@ -269,7 +269,7 @@ static constexpr ullong round_tsc(ullong val)
ullong utils::get_tsc_freq() ullong utils::get_tsc_freq()
{ {
const ullong cal_tsc = []() -> ullong static const ullong cal_tsc = []() -> ullong
{ {
if (!has_invariant_tsc()) if (!has_invariant_tsc())
return 0; return 0;