F´ Flight Software - C/C++ Documentation
NASA-v2.0.0
A framework for building embedded system applications to NASA flight quality standards.
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
Functions
a
b
c
d
g
h
i
m
r
s
t
v
w
Variables
Typedefs
Enumerations
Enumerator
a
b
f
h
i
n
o
p
s
v
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
z
~
Functions
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
z
~
Variables
b
d
e
f
g
h
i
l
m
n
p
q
s
t
u
v
w
Typedefs
Enumerations
Enumerator
a
b
c
d
e
f
g
h
l
m
n
o
p
q
r
s
t
w
Related Functions
Files
File List
File Members
All
_
a
b
c
d
f
g
h
i
k
l
m
n
p
r
s
t
u
v
Functions
f
i
m
s
u
Variables
Typedefs
Enumerations
Enumerator
c
d
f
m
p
r
s
t
Macros
a
c
d
f
g
h
i
k
l
m
n
p
r
s
t
u
v
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
IntervalTimer.cpp
Go to the documentation of this file.
1
14
#include <
Os/IntervalTimer.hpp
>
15
#include <
Fw/Types/Assert.hpp
>
16
#include <string.h>
17
18
namespace
Os
{
19
20
// Adapted from: http://www.gnu.org/software/libc/manual/html_node/Elapsed-Time.html
21
// should be t1In - t2In
22
U32
IntervalTimer::getDiffUsec
(
const
RawTime& t1In,
const
RawTime& t2In) {
23
RawTime result = {t1In.upper - t2In.upper, 0};
24
if
(t1In.lower < t2In.lower) {
25
result.upper -= 1;
// subtract nsec carry to seconds
26
result.lower = t1In.lower + (1000000000 - t2In.lower);
27
}
else
{
28
result.lower = t1In.lower - t2In.lower;
29
}
30
return
(result.upper * 1000000) + (result.lower / 1000);
31
}
32
}
Os
Definition:
File.cpp:7
IntervalTimer.hpp
Os::IntervalTimer::getDiffUsec
U32 getDiffUsec(void)
Definition:
IntervalTimerCommon.cpp:34
Assert.hpp
Os
X86
IntervalTimer.cpp
Generated by
1.8.17