lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-devel] Upgrading from v1.3.0 to 1.4.0 - sys_now()


From: Kieran Mansley
Subject: Re: [lwip-devel] Upgrading from v1.3.0 to 1.4.0 - sys_now()
Date: Tue, 17 May 2011 11:17:03 +0100

On Tue, 2011-05-17 at 02:54 -0700, Phil Perryman wrote:
> Ok, I have changed my timer interrupt to increment a count value evey
> millisecond and added a sys_now function which returns the value.  Main.c
> now calls sys_check_timeouts every iteration.  However in order to save CPU
> cycles, does the interrupt need to be triggered every millisecond or can it
> be for example every 250ms (obviously incrementing by 250 each time it's
> called)?

Look for all the definitions of *_TMR_INTERVAL in your port;  I think
the smallest that I can see in the standard set of defines is 100ms.
So, I think 250ms would be too long.  I think you'd be fine only
updating it every 10ms though, as this would mean the worst case for a
100ms timer would be it expiring after 90 to 110ms, which I would guess
would be acceptable.

Kieran




reply via email to

[Prev in Thread] Current Thread [Next in Thread]