You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
ACPICA: Add time macros for various timer/time manipulation.
Constants for time manipulation, including constants for the 100 nanosecond timers. Chao Guan, Bob Moore, Lv Zheng. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
committed by
Rafael J. Wysocki
parent
c8d586f8ed
commit
c41679a448
@@ -176,10 +176,11 @@ acpi_get_timer_duration(u32 start_ticks, u32 end_ticks, u32 * time_elapsed)
|
||||
/*
|
||||
* Compute Duration (Requires a 64-bit multiply and divide):
|
||||
*
|
||||
* time_elapsed = (delta_ticks * 1000000) / PM_TIMER_FREQUENCY;
|
||||
* time_elapsed (microseconds) =
|
||||
* (delta_ticks * ACPI_USEC_PER_SEC) / ACPI_PM_TIMER_FREQUENCY;
|
||||
*/
|
||||
status = acpi_ut_short_divide(((u64) delta_ticks) * 1000000,
|
||||
PM_TIMER_FREQUENCY, "ient, NULL);
|
||||
status = acpi_ut_short_divide(((u64)delta_ticks) * ACPI_USEC_PER_SEC,
|
||||
ACPI_PM_TIMER_FREQUENCY, "ient, NULL);
|
||||
|
||||
*time_elapsed = (u32) quotient;
|
||||
return_ACPI_STATUS(status);
|
||||
|
||||
Reference in New Issue
Block a user