При компиляции программы, которую я написал в Mac OS X после установки необходимых библиотек через MacPorts, я получаю эту ошибку:
In function 'nanotime':
error: 'CLOCK_REALTIME' undeclared (first use in this function)
error: (Each undeclared identifier is reported only once
error: for each function it appears in.)
Похоже, что clock_gettime
не реализовано в Mac OS X. Существует ли альтернативный способ получения эпохи в наносекундах? К сожалению, gettimeofday
находится в микросекундах.