1
0
forked from fsfw/fsfw

Split up FIFO into StaticFIFO and normale FIFO

This commit is contained in:
2020-07-05 23:53:13 +02:00
parent 2395e487ae
commit ebec074655
12 changed files with 309 additions and 84 deletions

View File

@ -90,3 +90,10 @@ double timevalOperations::toDouble(const timeval timeval) {
double result = timeval.tv_sec * 1000000. + timeval.tv_usec;
return result / 1000000.;
}
timeval timevalOperations::toTimeval(const double seconds) {
timeval tval;
tval.tv_sec = seconds;
tval.tv_usec = seconds *(double) 1e6 - (tval.tv_sec *1e6);
return tval;
}