implemented the gettimeofday in windows