fprime/Svc/LinuxTimer/LinuxTimerComponentImplTaskDelay.cpp
2021-09-21 09:36:06 -07:00

32 lines
865 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 <Svc/LinuxTimer/LinuxTimerComponentImpl.hpp>
#include "Fw/Types/BasicTypes.hpp"
#include <Os/Task.hpp>
namespace Svc {
void LinuxTimerComponentImpl::startTimer(NATIVE_INT_TYPE interval) {
while (true) {
Os::Task::delay(interval);
if (this->m_quit) {
return;
}
this->m_timer.take();
this->CycleOut_out(0,this->m_timer);
}
}
} // end namespace Svc