Skip to content

Commit

Permalink
[Quick.Thread.TScheduledTask] >> Added milliseconds measure (maybe no…
Browse files Browse the repository at this point in the history
…t precise)
  • Loading branch information
Turrican committed Jul 30, 2019
1 parent 9110a60 commit 5e5c62d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Quick.Threads.pas
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ TAnonymousThread = class(TInterfacedObject,IAnonymousThread)

TScheduleMode = (smRunOnce, smRepeatMode);

TTimeMeasure = (tmDays, tmHours, tmMinutes, tmSeconds);
TTimeMeasure = (tmDays, tmHours, tmMinutes, tmSeconds, tmMilliseconds);

ITask = interface
['{0182FD36-5A7C-4C00-BBF8-7CFB1E3F9BB1}']
Expand Down Expand Up @@ -1401,6 +1401,7 @@ function TScheduledTask.CheckSchedule: Boolean;
tmHours : fNextExecution := IncHour(fNextExecution,fTimeInterval);
tmMinutes : fNextExecution := IncMinute(fNextExecution,fTimeInterval);
tmSeconds : fNextExecution := IncSecond(fNextExecution,fTimeInterval);
tmMilliseconds : fNextExecution := IncMilliSecond(fNextExecution, fTimeInterval);
end;

if Now() > fNextExecution then Result := False //avoid execution if system time was altered
Expand Down

0 comments on commit 5e5c62d

Please sign in to comment.