20 lines
591 B
C++
20 lines
591 B
C++
#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) + "-";
|
|
}
|
|
|