add optional selector parameter to constructor of cxxtools::Timer and add demo for timer