diff options
author | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2010-10-11 11:25:38 +0200 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2010-10-11 11:25:38 +0200 |
commit | 471f4f65d21c552c45af2583f3b312ab8fbfa579 (patch) | |
tree | db00a64a7c82518932de9111864f58da86c0ef29 /src/corelib | |
parent | f05da3dee5dd4f22a44e035fc07bdf6b3acb3c2a (diff) | |
download | fpGUI-471f4f65d21c552c45af2583f3b312ab8fbfa579.tar.xz |
new method, Pause(), introduced to TfpgTimer
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/fpg_main.pas | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/corelib/fpg_main.pas b/src/corelib/fpg_main.pas index b2988182..c89dc51d 100644 --- a/src/corelib/fpg_main.pas +++ b/src/corelib/fpg_main.pas @@ -293,6 +293,7 @@ type destructor Destroy; override; procedure CheckAlarm(ctime: TDateTime); procedure Reset; virtual; + procedure Pause(ASeconds: integer); property Enabled: boolean read FEnabled write SetEnabled; property NextAlarm: TDateTime read FNextAlarm; { Interval is in milliseconds. } @@ -446,6 +447,7 @@ implementation uses strutils, math, + dateutils, fpg_imgfmt_bmp, fpg_stdimages, fpg_translations, @@ -1032,6 +1034,14 @@ begin Enabled := True; end; +procedure TfpgTimer.Pause(ASeconds: integer); +begin + if Enabled then + begin + FNextAlarm := incSecond(Now, ASeconds); + end; +end; + function fpgApplication: TfpgApplication; begin if not Assigned(uApplication) then |