src/demo was removed, src/examples and src/benchmarks were moved to the top level
This commit is contained in:
23
example/timestamp.cpp
Normal file
23
example/timestamp.cpp
Normal file
@@ -0,0 +1,23 @@
|
||||
#include <iostream>
|
||||
#include <chrono>
|
||||
#include <thread>
|
||||
|
||||
#include "utils/datetime/timestamp.hpp"
|
||||
|
||||
int main(void)
|
||||
{
|
||||
auto timestamp = Timestamp::now();
|
||||
|
||||
std::cout << timestamp << std::endl;
|
||||
std::cout << Timestamp::now() << std::endl;
|
||||
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(250));
|
||||
|
||||
std::cout << Timestamp::now().to_iso8601() << std::endl;
|
||||
|
||||
std::cout << std::boolalpha;
|
||||
|
||||
std::cout << (timestamp == Timestamp::now()) << std::endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user