[Xorp-hackers] Delay in XORP?

Bruce M Simpson bms at incunabulum.net
Sun Aug 3 09:53:14 PDT 2008


Nguyen Van Nam wrote:
> Hi all,
> I want to use the delay function in XORP (like function sleep(ms) in C)
> but i don't know what exactly is this?
> Coul you please explain me?

You cannot or should not do this directly for these reasons:
 * it may result in the EventLoop not being run;
 * it isn't portable code.

Either run a bounded while loop around EventLoop::run(), or use 
TimerList::system_sleep().

thanks
BMS



More information about the Xorp-hackers mailing list