Added function to get high-res time, adjusted select to not block.