Define a timer thread
Merge branch 'tmp'