Running Procedure from main code from a library

You might consider adding to the library a callback function that is normally empty and that, if it is assigned, the library calls in it's timer routine. Then you can keep your code in your own files and hook into the library routine by assigning a function pointer to the callback.

This would likely be a lot easier to set up since it involves only a minimal amount of editing of the library (maybe 5 lines of code).