[RFC] remove gettimeofday() usage

Ping @equalsraf. When this is merged, you'll probably be able to excise a hack.
Actually I take that back,I`CHECK_DOUBLE_CLICK` probably is only needed if the UI does not take care of double/triple-click detection. So we should leave this wrapped.