TTimer requests periodic OnTimer notifications. Its Interval is an unsigned Cardinal measured in milliseconds. A value of 1 requests a short interval. It does not guarantee one callback every millisecond, and it does not make unrelated operations faster.
The LCL timer is serviced through the GUI event loop. Long handlers and other work can delay callbacks. Use Enabled := False to stop notifications. Setting Interval to zero does not reverse time.
For an Undo feature in your own program:
- Save the previous application state before changing it, or record an operation with an inverse.
- Restore that state when Undo is requested.
- Keep that history separate from the timer used to refresh a display.
This can restore an unsent draft your program saved. Restoring a local draft does not retract an email already delivered by another system. Changing a displayed countdown also does not undo the event it counts toward.
Read the error message. Then read it again.