[En-Nut-Discussion] NutEventWait vs. NetSleep

Harald Kipp harald.kipp at egnite.de
Fri Nov 27 18:02:21 CET 2009


Rich Peters wrote:

> NutEventWait() on a private queue handle instead NutSleep.  The Event is being 
> used to cause a timeout, no code ever sets the event.
> 
> Is there any reason for this?  Are the two usages equivalent at this point in time?

An event wait with timeout other than NUT_WAIT_INFINITE creates an entry
in the timer queue. The same queue that is used for NutSleep.

There's more overhead with NutEventWait, because 2 queues are involved,
the event queue and the timer queue. But from the programmer's point of
view they are almost identical.

Harald





More information about the En-Nut-Discussion mailing list