I need to get system time in nanoseconds and send it to influxdb as a timestamp. I know
std::chrono::high_resolution_clock::now()
gives current system time in nanosecodns but I could not manage to convert it to primitive types.
When I pass the code below, I see something like 1970-01-09T... in the database
std::chrono::high_resolution_clock::now().time_since_epoch().count()