VC 中的 struct timeval 转成DELPHI 是什么有人知道吗?

来源:百度知道 编辑:UC知道 时间:2024/05/15 17:37:38
VC 中的 struct timeval 转成DELPHI 是什么有人知道吗?
哦,刚才找到定义这个结构体的头文件了。
struct timeval {
long tv_sec; /* seconds */
long tv_usec; /* and microseconds */
};
转成Delphi 应该是
type timeval = record
tv_sec:LongInt;
tv_usec:LongInt;
end;
你说对吗?

你看看是不是
TWMTimer 或 TTimeStamp
你要是把timeval 里面的参数发出来我可以帮你找找对比下
delphi里我找的那两个结构体
TTimeStamp = record
Time: Integer; { Number of milliseconds since midnight }
Date: Integer; { One plus number of days since 1/1/0001 }
end;

TWMTimer = packed record
Msg: Cardinal;
TimerID: Longint;
TimerProc: TFarProc;
Result: Longint;
end;
看样子像是TTimeStamp
你自己写的那个也行,应该没什么问题

我知道。
winsock单元里面就有

PTimeVal = ^TTimeVal;
{$EXTERNALSYM timeval}
timeval = record
tv_sec: Longint;
tv_usec: Longint;
end;
TTimeVal = timeval;