forked from Mirrorlandia_minetest/minetest
Fix unit reported by TimeTaker (was always ms)
This commit is contained in:
parent
8a44df8cba
commit
26495da94a
@ -44,8 +44,17 @@ u32 TimeTaker::stop(bool quiet)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(quiet == false)
|
if (!quiet) {
|
||||||
infostream<<m_name<<" took "<<dtime<<"ms"<<std::endl;
|
static const char* const units[] = {
|
||||||
|
"s" /* PRECISION_SECONDS */,
|
||||||
|
"ms" /* PRECISION_MILLI */,
|
||||||
|
"us" /* PRECISION_MICRO */,
|
||||||
|
"ns" /* PRECISION_NANO */,
|
||||||
|
};
|
||||||
|
infostream << m_name << " took "
|
||||||
|
<< dtime << units[m_precision]
|
||||||
|
<< std::endl;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
m_running = false;
|
m_running = false;
|
||||||
return dtime;
|
return dtime;
|
||||||
|
Loading…
Reference in New Issue
Block a user