TTimer does not support what you are asking for. As other users have already commented, you will need to stop the timer, reset its Interval to any remaining time, start it, and then stop and reset its Interval to return to 10 seconds when the next OnTimer event is fired.
A simpler solution is to simply let TTimer work fine and have a separate flag that tells the OnTimer event handler whether it can do its job or not when it starts, for example:
var Boolean: Paused = False; procedure TForm1.Timer1Timer(Sender: TObject); begin if not Paused then begin // do proccess end; end; procedure TForm1.PauseButtonClick(Sender: TObject); begin Paused := True; end; procedure TForm1.ResumeButtonClick(Sender: TObject); begin Paused := False; end;
source share