F´ Flight Software - C/C++ Documentation NASA-v1.6.0
A framework for building embedded system applications to NASA flight quality standards.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 {
14 {
15 }
16
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
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 init()
Object initializer.
Definition ObjBase.cpp:27
void set(U32 seconds, U32 useconds)
Definition Time.cpp:25
void timeGetPort_handler(NATIVE_INT_TYPE portNum, Fw::Time &time)
Handler for input port timeGetPort.
LinuxTimeImpl(const char *compName)
Auto-generated base for Time component.