The Time Manager allows you to specify a routine to be run after a certain amount of time has expired, with sub-millisecond precision. This task is called as an interupt, so of course your application A5 isnt valid. This means you can't get to your globals. Furthermore you cant arrange to restore the proper A5 without a little asm glue code.
The routines I define below make it easy to specify a TimeManager routine. In addition they do some work for you to reset the A5 that was active at the time they were called so that your globals will be in the right place. All without you having to think about any assembly to make it work.
Source and example for Mac (binhex) -
Possibly newer versions of TimeManager.cp and TimeManager.h - /u/jedavis/src/lib/libmac