#pragma once
#include <cstdint>
#include <string>
namespace simulation_framework
{
namespace core
{
namespace time
{
struct Timestamp
{
uint32_t seconds;
uint32_t nanoseconds;
std::string DebugString() const
{
return "Simulation timestamp: " + std::to_string(seconds) + " second and " + std::to_string(nanoseconds) +
" nanos ";
}
};
inline bool operator==(const Timestamp& lhs, const Timestamp& rhs)
{
return (lhs.seconds == rhs.seconds) && (lhs.nanoseconds == rhs.nanoseconds);
}
} // namespace time
} // namespace core
} // namespace simulation_framework
timestamp.h
Was this page helpful?