[RFC] remove gettimeofday() usage

Ping @equalsraf. When this is merged, you'll probably be able to excise a hack.
No xterm at the moment.