delphi中时间的比较
在delphi中用datatime类型的数据进行时间比较时我是这样处理的:
例如:var systime : datetime;
beforeopertime: datetime; --上次操作时间
begin
TimeOut := 6; -- 单位:秒
systime := now();
if systime - beforeopertime > (TimeOut/(24*60*60) then
--处理内容
end if;
end;
请问这样的处理方法是否正确?谢谢