diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-05-05 21:10:18 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-05-05 21:10:18 +0200 |
| commit | f95d8bf159d10b5a9521dcaa0bc37aa0e9dfc02b (patch) | |
| tree | bf8186f1a0521a64983bb0bca4f7b54883542195 /Private/Source/Timer.cxx | |
| parent | 5a903c1d8f80ca8d7bc5fbea0aea710ce0133f9d (diff) | |
MHR-23: Add run_format.sh, kernel patches.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'Private/Source/Timer.cxx')
| -rw-r--r-- | Private/Source/Timer.cxx | 28 |
1 files changed, 20 insertions, 8 deletions
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; } |
