rewrite timer module to use kqueue EVFILE_TIMER for osx/ios