Reorder includes and add <time.h>.