fprime/Svc/LinuxTimer/LinuxTimerTaskDelay.cpp
M Starch 10f2b49d3f
Modify LinuxTimer interface for consistency (#4087)
* Use Fw::TimeInterval in LinuxTimer

* Fix Linux FD typo

* Fix interval timer UT

* Format

* Fix assert casts

* Fix ComLogger UTs

* Fix FppTest microseconds

* Fix casting

* Fix overflow
2025-09-02 15:22:07 -07:00

34 lines
919 B
C++

// ======================================================================
// \title LinuxTimerImpl.cpp
// \author tim
// \brief cpp file for LinuxTimer component implementation class
//
// \copyright
// Copyright 2009-2015, by the California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#include <Fw/FPrimeBasicTypes.hpp>
#include <Os/Task.hpp>
#include <Svc/LinuxTimer/LinuxTimer.hpp>
namespace Svc {
void LinuxTimer::startTimer(const Fw::TimeInterval& interval) {
while (true) {
Os::Task::delay(interval);
this->m_mutex.lock();
bool quit = this->m_quit;
this->m_mutex.unLock();
if (quit) {
return;
}
this->m_rawTime.now();
this->CycleOut_out(0, this->m_rawTime);
}
}
} // end namespace Svc