type WORD
is mod 2**16;
-- SYSTEMTIME 结构
type SYSTEMTIME
is record
year : word; -- 年
month : word; -- 月
dayofweek : word; -- 星期,0=星期日,1=星期一
day : word; -- 天
hour : word; -- 时
minute : word; -- 分
second : word; -- 秒
Milliseconds : word; -- 毫秒
end record;
type LPSYSTEMTIME
is access SYSTEMTIME;
procedure GetSystemTime(SYSTIME:LPSYSTEMTIME);
function GetSystemTime(SYSTIME:LPSYSTEMTIME)
return integer;
pragma import(stdcall,GetSystemTime,"GetSystemTime");
使用注意:
1、参数SYSTIME必须首先分配内存空间,否则引起PROGRAM_ERROR 。
2、该函数获取格林威治标准时间。