В старом пакете для получения текущей даты/времени мы использовали:
Код: Выделить всё
struct timeval dateTime;
gettimeofday(&dateTime, NULL);
function(dateTime); // The function will do its task
Код: Выделить всё
system_clock::time_point now = system_clock::now();
struct timeval dateTime;
dateTime.tv_sec = ???? // Help appreciated here
dateTime.tv_usec = ???? // Help appreciated here
function(dateTime);
Код: Выделить всё
struct timeval dateTime;
function(&dateTime);
system_clock::time_point returnedDateTime = ?? // Help appreciated
Подробнее здесь: https://stackoverflow.com/questions/394 ... l-and-back
Мобильная версия