mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-05-28 15:34:33 +00:00
Change "GetMillisecondsSinceClassCreation" to "GetNanosecondsSinceClassCreation"
This commit is contained in:
parent
fcbb298077
commit
8471126696
@ -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
|
||||
}
|
||||
|
||||
|
@ -55,7 +55,7 @@ namespace Time
|
||||
#endif
|
||||
}
|
||||
|
||||
uint64_t TimeStampCounter::GetMillisecondsSinceClassCreation()
|
||||
uint64_t TimeStampCounter::GetNanosecondsSinceClassCreation()
|
||||
{
|
||||
#if defined(a86)
|
||||
return (this->GetCounter() - this->ClassCreationTime) / this->clk;
|
||||
|
@ -118,7 +118,7 @@ namespace Time
|
||||
}
|
||||
}
|
||||
|
||||
uint64_t time::GetMillisecondsSinceClassCreation()
|
||||
uint64_t time::GetNanosecondsSinceClassCreation()
|
||||
{
|
||||
switch (ActiveTimer)
|
||||
{
|
||||
@ -132,7 +132,7 @@ namespace Time
|
||||
fixme("PIT sleep not implemented");
|
||||
return false;
|
||||
case HPET:
|
||||
return this->hpet->GetMillisecondsSinceClassCreation();
|
||||
return this->hpet->GetNanosecondsSinceClassCreation();
|
||||
case ACPI:
|
||||
fixme("ACPI sleep not implemented");
|
||||
return false;
|
||||
@ -140,7 +140,7 @@ namespace Time
|
||||
fixme("APIC sleep not implemented");
|
||||
return false;
|
||||
case TSC:
|
||||
return this->tsc->GetMillisecondsSinceClassCreation();
|
||||
return this->tsc->GetNanosecondsSinceClassCreation();
|
||||
default:
|
||||
error("Unknown timer");
|
||||
return false;
|
||||
|
@ -103,7 +103,7 @@ namespace Time
|
||||
bool Sleep(uint64_t Duration, Units Unit);
|
||||
uint64_t GetCounter();
|
||||
uint64_t CalculateTarget(uint64_t Target, Units Unit);
|
||||
uint64_t GetMillisecondsSinceClassCreation();
|
||||
uint64_t GetNanosecondsSinceClassCreation();
|
||||
|
||||
HighPrecisionEventTimer(void *hpet);
|
||||
~HighPrecisionEventTimer();
|
||||
@ -151,7 +151,7 @@ namespace Time
|
||||
bool Sleep(uint64_t Duration, Units Unit);
|
||||
uint64_t GetCounter();
|
||||
uint64_t CalculateTarget(uint64_t Target, Units Unit);
|
||||
uint64_t GetMillisecondsSinceClassCreation();
|
||||
uint64_t GetNanosecondsSinceClassCreation();
|
||||
|
||||
TimeStampCounter();
|
||||
~TimeStampCounter();
|
||||
@ -192,7 +192,7 @@ namespace Time
|
||||
bool Sleep(uint64_t Duration, Units Unit);
|
||||
uint64_t GetCounter();
|
||||
uint64_t CalculateTarget(uint64_t Target, Units Unit);
|
||||
uint64_t GetMillisecondsSinceClassCreation();
|
||||
uint64_t GetNanosecondsSinceClassCreation();
|
||||
void FindTimers(void *acpi);
|
||||
time();
|
||||
~time();
|
||||
|
Loading…
x
Reference in New Issue
Block a user