ptth/bare_minimum_crypto/cpp/time_helpers.cpp

14 lines
286 B
C++

#include "time_helpers.h"
#include <chrono>
namespace BareMinimumCrypto {
using namespace std;
using namespace chrono;
int64_t get_seconds_since_epoch () {
const auto utc_now = system_clock::now ();
return duration_cast <seconds> (utc_now.time_since_epoch ()).count ();
}
}