#include #include int main() { // Use system_clock to ensure epoch alignment with 1970-01-01 auto now = std::chrono::system_clock::now(); // Cast the duration to nanoseconds and retrieve the count auto now_ns = std::chrono::duration_cast( now.time_since_epoch() ); std::cout << "Nanoseconds since epoch: " << now_ns.count() << std::endl; return 0; }