[GAP] Periodic task

Daniel Lewandowski daniellewandowski at tlen.pl
Fri Sep 15 01:07:24 CEST 2006


Hello,

I'm trying to write a periodic task. It has to send a UDP packet for
every 10 ms time slice. But an obvious solution:

	declare
		Slice : Time_Span := Milliseconds (10);
		Slot : Time := Clock;

	...	

	loop
		-- send packet
           	Send_Socket (Socket, Token, Last);

		-- wait until next slot time
		Slot := Slot + Slice;
	        delay until Slot;
        end loop;

doesn't work properly. Time period between sending packet is 7 - 20
millisconds.

How can I make a properly working periodic task?

Regards,
Daniel Lewandowski




More information about the GAP mailing list