mirror of
https://github.com/nasa/trick.git
synced 2024-12-22 22:42:26 +00:00
29 lines
492 B
C++
29 lines
492 B
C++
|
/*
|
||
|
PURPOSE:
|
||
|
( Base Timer class )
|
||
|
PROGRAMMERS:
|
||
|
((Alex Lin) (NASA) (August 2010) (--) (c++ port)))
|
||
|
*/
|
||
|
|
||
|
#include "sim_services/Timer/include/Timer.hh"
|
||
|
|
||
|
Trick::Timer::Timer() : enabled(false) , active(false) {}
|
||
|
|
||
|
int Trick::Timer::enable() {
|
||
|
enabled = true ;
|
||
|
return(0) ;
|
||
|
}
|
||
|
|
||
|
int Trick::Timer::disable() {
|
||
|
enabled = false ;
|
||
|
return(0) ;
|
||
|
}
|
||
|
|
||
|
bool Trick::Timer::get_enabled() {
|
||
|
return(enabled) ;
|
||
|
}
|
||
|
|
||
|
void Trick::Timer::set_active(bool in_active) {
|
||
|
active = in_active ;
|
||
|
}
|