simulate gettimeofday on windows