Ok I sort of see what you are doing.
While you are testing your program it might help to add a routine to toggle a led to the interrupt function. If everything is working correctly the interrupt should occur every 8 seconds.
Also when you declare the global variable count you should initialise it to some non-zero value to prevent the program going into the
"if(!count)" statement. Also for the same reason when you turn off the counter after the 1hour time-out you should reload the count variable to some non-zero value.
Once you are satisfied that the timer works you can put shift the call to t0setup(); into your button finding routines and put them in the while(1) loop.
While you are testing your program it might help to add a routine to toggle a led to the interrupt function. If everything is working correctly the interrupt should occur every 8 seconds.
Also when you declare the global variable count you should initialise it to some non-zero value to prevent the program going into the
"if(!count)" statement. Also for the same reason when you turn off the counter after the 1hour time-out you should reload the count variable to some non-zero value.
Once you are satisfied that the timer works you can put shift the call to t0setup(); into your button finding routines and put them in the while(1) loop.