mirror of
https://github.com/nasa/fprime.git
synced 2025-12-11 13:54:34 -06:00
32 lines
865 B
C++
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
|