struct timespec
is a type name used in e.g. Linux, see the manual page for clock_gettime()
. You get the type declaration by doing #include <time.h>
on systems that support it. According to the manual page, this is POSIX standard functionality.
I think the code you're looking at is using the #ifdef
to declare the type for environments that don't support it natively.