applied formatting
This commit is contained in:
@ -1,28 +1,22 @@
|
||||
#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;
|
||||
}
|
||||
ReturnValue_t result = Clock::getDateAndTime(&time);
|
||||
if (result != RETURN_OK) {
|
||||
sif::warning << "Timestamp::Timestamp: Failed to get time" << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
Timestamp::~Timestamp() {
|
||||
}
|
||||
Timestamp::~Timestamp() {}
|
||||
|
||||
std::string Timestamp::str() {
|
||||
timestamp << std::to_string(time.year) << "-"
|
||||
<< std::setw(2) << std::setfill('0')
|
||||
<< std::to_string(time.month) << "-"
|
||||
<< std::setw(2) << std::setfill('0')
|
||||
<< std::to_string(time.day) << "--"
|
||||
<< std::setw(2) << std::setfill('0')
|
||||
<< std::to_string(time.hour) << "-"
|
||||
<< std::setw(2) << std::setfill('0')
|
||||
<< std::to_string(time.minute) << "-"
|
||||
<< std::setw(2) << std::setfill('0')
|
||||
<< std::to_string(time.second) << "--";
|
||||
return timestamp.str();
|
||||
timestamp << std::to_string(time.year) << "-" << std::setw(2) << std::setfill('0')
|
||||
<< std::to_string(time.month) << "-" << std::setw(2) << std::setfill('0')
|
||||
<< std::to_string(time.day) << "--" << std::setw(2) << std::setfill('0')
|
||||
<< std::to_string(time.hour) << "-" << std::setw(2) << std::setfill('0')
|
||||
<< std::to_string(time.minute) << "-" << std::setw(2) << std::setfill('0')
|
||||
<< std::to_string(time.second) << "--";
|
||||
return timestamp.str();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user