need this. Also stop removing sys/time.h unless the source file uses struct timeval.
instead of spinning to avoid hogging the CPU.