Change timer method from OS-dependent ones to
std::condition_variable::wait_for.

This change will cut down timer's resolution by milliseconds
(at least in Windows), but reduces complexity of making and
managing platform specific ones (waitable timer, timerfd, epoll,
kqueue, ....)