Browse Source

Merge remote-tracking branch 'origin/develop' into develop

Turrican 6 years ago
parent
commit
d5937a006e
2 changed files with 6 additions and 5 deletions
  1. 5 5
      Quick.Threads.pas
  2. 1 0
      README.md

+ 5 - 5
Quick.Threads.pas

@@ -7,7 +7,7 @@
   Author      : Kike Pérez
   Author      : Kike Pérez
   Version     : 1.4
   Version     : 1.4
   Created     : 09/03/2018
   Created     : 09/03/2018
-  Modified    : 04/03/2019
+  Modified    : 31/07/2019
 
 
   This file is part of QuickLib: https://github.com/exilon/QuickLib
   This file is part of QuickLib: https://github.com/exilon/QuickLib
 
 
@@ -1318,7 +1318,7 @@ begin
   fScheduleMode := TScheduleMode.smRepeatMode;
   fScheduleMode := TScheduleMode.smRepeatMode;
   fTimeMeasure := aTimeMeasure;
   fTimeMeasure := aTimeMeasure;
   fTimeInterval := aInterval;
   fTimeInterval := aInterval;
-  if fStartDate = 0.0 then fStartDate := Now();
+  if fStartDate < Now() then fStartDate := Now();
   fNextExecution := fStartDate;
   fNextExecution := fStartDate;
   fEnabled := True;
   fEnabled := True;
 end;
 end;
@@ -1329,7 +1329,7 @@ begin
   fScheduleMode := TScheduleMode.smRepeatMode;
   fScheduleMode := TScheduleMode.smRepeatMode;
   fTimeMeasure := aTimeMeasure;
   fTimeMeasure := aTimeMeasure;
   fTimeInterval := aInterval;
   fTimeInterval := aInterval;
-  if fStartDate = 0.0 then fStartDate := Now();
+  if fStartDate < Now() then fStartDate := Now();
   fExpirationDate := aEndTime;
   fExpirationDate := aEndTime;
   fNextExecution := fStartDate;
   fNextExecution := fStartDate;
   fEnabled := True;
   fEnabled := True;
@@ -1351,7 +1351,7 @@ begin
   fScheduleMode := TScheduleMode.smRepeatMode;
   fScheduleMode := TScheduleMode.smRepeatMode;
   fTimeMeasure := aTimeMeasure;
   fTimeMeasure := aTimeMeasure;
   fTimeInterval := aInterval;
   fTimeInterval := aInterval;
-  if fStartDate = 0.0 then fStartDate := Now();
+  if fStartDate < Now() then fStartDate := Now();
   fExpirationTimes := aRepeatTimes;
   fExpirationTimes := aRepeatTimes;
   fNextExecution := fStartDate;
   fNextExecution := fStartDate;
   fEnabled := True;
   fEnabled := True;
@@ -1360,7 +1360,7 @@ end;
 procedure TScheduledTask.RunOnce;
 procedure TScheduledTask.RunOnce;
 begin
 begin
   fScheduleMode := TScheduleMode.smRunOnce;
   fScheduleMode := TScheduleMode.smRunOnce;
-  if fStartDate = 0.0 then fStartDate := Now();
+  if fStartDate < Now() then fStartDate := Now();
   fNextExecution := fStartDate;
   fNextExecution := fStartDate;
   fEnabled := True;
   fEnabled := True;
 end;
 end;

+ 1 - 0
README.md

@@ -62,6 +62,7 @@ Small delphi/Firemonkey(Windows, Linux, Android, OSX & IOS) and fpc(Windows & Li
 * NEW: Delphi Linux compatibility
 * NEW: Delphi Linux compatibility
 * NEW: QuickConfigJson reload if config file changed
 * NEW: QuickConfigJson reload if config file changed
 * NEW: First version with OSX/IOS partial support
 * NEW: First version with OSX/IOS partial support
+* NEW: Delphinus-Support
 
 
 **Documentation:**
 **Documentation:**
 ----------
 ----------