timer_magic function

Sets up a timer that can be used within _magic functions