summaryrefslogtreecommitdiffhomepage
path: root/Private/Source/Timer.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Private/Source/Timer.cxx')
-rw-r--r--Private/Source/Timer.cxx28
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;
}