F´ Flight Software - C/C++ Documentation NASA-v1.6.0
A framework for building embedded system applications to NASA flight quality standards.
Loading...
Searching...
No Matches
DarwinTimeImpl.cpp
Go to the documentation of this file.
1/*
2 * TestCommand1Impl.cpp
3 *
4 * Created on: Mar 28, 2014
5 * Author: tcanham
6 */
7
9#include <Fw/Time/Time.hpp>
10#include <sys/time.h>
11
12namespace Svc {
13 LinuxTimeImpl::LinuxTimeImpl(const char* name) : TimeComponentBase(name)
14 {
15 }
16
18 }
19
21 NATIVE_INT_TYPE portNum,
22 Fw::Time &time
23 ) {
24 timeval stime;
25 (void)gettimeofday(&stime,0);
26 time.set(TB_WORKSTATION_TIME,0,stime.tv_sec, stime.tv_usec);
27 }
28
30 Svc::TimeComponentBase::init(instance);
31 }
32
33}
PlatformIntType NATIVE_INT_TYPE
Definition BasicTypes.h:51
@ TB_WORKSTATION_TIME
Time as reported on workstation where software is running. For testing.
Definition FpConfig.h:41
void set(U32 seconds, U32 useconds)
Definition Time.cpp:25
void timeGetPort_handler(NATIVE_INT_TYPE portNum, Fw::Time &time)
LinuxTimeImpl(const char *compName)
void init(NATIVE_INT_TYPE instance)