Function to add or subtract the number of milliseconds to the specified date.
function IncMilliSecond(dt: double; iMilliSeconds: int64): double;
Parameter |
Type |
Value |
---|---|---|
dt |
double |
date/time value to which you need to add or subtract milliseconds; |
iMilliSeconds |
int64 |
number of milliseconds that you need to add or subtract. If the number is positive — add milliseconds, if negative — subtract. |
Returns a date/time value shifted by a specified number of milliseconds.
var
dt: double;
begin
dt := Now;
mLogScript(FormatDateTime('mm.dd.yyyy hh:nn:ss:zzz', dt), 'now');
dt := IncMilliSecond(dt, 10000);
mLogScript(FormatDateTime('mm.dd.yyyy hh:nn:ss:zzz', dt), '+10 seconds');
end.
[15:40:11] (Log "IncMilliSecond"): [now] 02.23.2016 15:40:11:803
[15:40:11] (Log "IncMilliSecond"): [+10 seconds] 02.23.2016 15:40:21:803