[fpc-pascal] fpnanosleep (again)
john at jcoppens.com
Thu Nov 8 02:37:51 CET 2007
On Wed, 7 Nov 2007 19:27:39 -0300
John Coppens <john at jcoppens.com> wrote:
> Is there any simple way (short of writing a kernel module) of delaying
> less than the HZ value?
Very unelegant, but it works:
procedure usleep(time: longint);
ref := tv.tv_usec;
diff := tv.tv_usec - ref;
if diff < 0 then
diff := diff + 1000000;
until diff > time;
in case someone is interested.
More information about the fpc-pascal