time: use timespec instead of timeval.