timestamp for file creation
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
This commit is contained in:
19
mission/utility/Timestamp.cpp
Normal file
19
mission/utility/Timestamp.cpp
Normal file
@ -0,0 +1,19 @@
|
||||
#include "Timestamp.h"
|
||||
#include "fsfw/serviceinterface/ServiceInterfacestream.h"
|
||||
|
||||
Timestamp::Timestamp() {
|
||||
ReturnValue_t result = Clock::getDateAndTime(&time);
|
||||
if (result != RETURN_OK) {
|
||||
sif::warning << "Timestamp::Timestamp: Failed to get time" << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
Timestamp::~Timestamp() {
|
||||
}
|
||||
|
||||
std::string Timestamp::str() {
|
||||
return std::to_string(time.year) + "-" + std::to_string(time.month) + "-"
|
||||
+ std::to_string(time.day) + "--" + std::to_string(time.hour) + "-"
|
||||
+ std::to_string(time.minute) + "-" + std::to_string(time.second) + "-";
|
||||
}
|
||||
|
Reference in New Issue
Block a user