From f95d8bf159d10b5a9521dcaa0bc37aa0e9dfc02b Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Sun, 5 May 2024 21:10:18 +0200 Subject: MHR-23: Add run_format.sh, kernel patches. Signed-off-by: Amlal El Mahrouss --- Private/Source/Timer.cxx | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) (limited to 'Private/Source/Timer.cxx') diff --git a/Private/Source/Timer.cxx b/Private/Source/Timer.cxx index fbfb768c..da80db1e 100644 --- a/Private/Source/Timer.cxx +++ b/Private/Source/Timer.cxx @@ -12,18 +12,30 @@ using namespace NewOS; /// @brief Unimplemented as it is an interface. -Int32 HardwareTimerInterface::Wait() noexcept { return H_UNIMPLEMENTED; } +Int32 HardwareTimerInterface::Wait() noexcept +{ + return H_UNIMPLEMENTED; +} /// @brief HardwareTimer class, meant to be generic. -HardwareTimer::HardwareTimer(Int64 seconds) : fWaitFor(seconds) {} -HardwareTimer::~HardwareTimer() { fWaitFor = 0; } +HardwareTimer::HardwareTimer(Int64 seconds) + : fWaitFor(seconds) +{ +} +HardwareTimer::~HardwareTimer() +{ + fWaitFor = 0; +} -Int32 HardwareTimer::Wait() noexcept { - if (fWaitFor < 1) return -1; +Int32 HardwareTimer::Wait() noexcept +{ + if (fWaitFor < 1) + return -1; - while (*fDigitalTimer < (*fDigitalTimer + fWaitFor)) { - } + while (*fDigitalTimer < (*fDigitalTimer + fWaitFor)) + { + } - return 0; + return 0; } -- cgit v1.2.3