FIX: incorrect conversion between timeval and timespec, caused unexpected behaviour on win64 machines