From 5e5c62dbd97dc7e94f038ae95926557603ea58bb Mon Sep 17 00:00:00 2001 From: Turrican Date: Tue, 30 Jul 2019 08:37:12 +0200 Subject: [PATCH] [Quick.Thread.TScheduledTask] >> Added milliseconds measure (maybe not precise) --- Quick.Threads.pas | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Quick.Threads.pas b/Quick.Threads.pas index fd98c72..e1d505f 100644 --- a/Quick.Threads.pas +++ b/Quick.Threads.pas @@ -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}'] @@ -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