Adding time.h for timespec.