I have an MFC application where periodically a windows timer interrupt occurs and it reads some data from a database for monitoring purposes

When a user event occurs such as displaying a modal dialog and then subsequently updating the database with a modication - during this period I want to suspend the timers. There is potentially a conflict with what is being read and written now.

There are 100s of event handlers throughout the application and would be tedious to suspend and resume the timer interrupts before and after the processing for each event handler.

Is there an easier way to do it?