I'd make another class, and wrap the timer in that class.
Put a label in your aspx and attach the script to it in page load
Label l = new Label()
Page_Load()
{
Yournamespace.MyTimer tm = new Yournamespace.MyTimer();
Label.Text = tm.GetScript();
}
Really you should Register script but I haven't actually done that yet ... but
should be easy.
Or you could consider wrapping the script into a resources dll (don't ask me
how, I can only do images at teh moment)