[fpc-pascal] getting system time in linux

Marco van de Voort marcov at stack.nl
Fri Apr 10 16:50:58 CEST 2009


In our previous episode, Jan De Bleser said:
> 
> How is it possible to get the system time in linux?
> It used to be possible by using 'getsystemtime' of the unit oldlinux, 
> but this unit is no longer available on my compiler...
> 
> The thing I want to use it for is: I get a packet form libpcap, with the 
> time of receival in system time.
> I want to convert this time to system time by doing something like:
> rcvTime := packet.rcvTime + (now - getSystemTime)

fptime probably. Note that not all *nix systems have system time set to GMT.



More information about the fpc-pascal mailing list