Change "GetMillisecondsSinceClassCreation" to "GetNanosecondsSinceClassCreation"

This commit is contained in:
Alex
2023-04-23 07:29:08 +03:00
parent fcbb298077
commit 8471126696
4 changed files with 12 additions and 9 deletions

View File

@ -55,10 +55,13 @@ namespace Time
#endif
}
uint64_t HighPrecisionEventTimer::GetMillisecondsSinceClassCreation()
uint64_t HighPrecisionEventTimer::GetNanosecondsSinceClassCreation()
{
#if defined(a86)
return (this->GetCounter() - this->ClassCreationTime) / (this->clk / this->ConvertUnit(Units::Milliseconds));
uint64_t Subtraction = this->GetCounter() - this->ClassCreationTime;
if (Subtraction <= 0 || this->clk <= 0)
return 0;
return Subtraction / (this->clk / ConvertUnit(Units::Nanoseconds));
#endif
}