[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] Timeout question
From: |
Sylvain Rochet |
Subject: |
Re: [lwip-users] Timeout question |
Date: |
Tue, 6 Nov 2018 10:08:11 +0100 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
Hi Ivan,
On Tue, Nov 06, 2018 at 09:52:24AM +0100, Ivan Warren wrote:
>
> My questions are :
>
> - How often should I invoke sys_check_timeouts() (every ms, every 10 ms,
> every second) - or (better) is there a way to determine (after any state
> change obviously) when the next timeout is due ?
Is sys_timeouts_sleeptime what you are looking for ?
> - does sys_now/sys_jiffies have to be exactly milleseconds or would powers
> of 2 do ? (I have a microsecond counter and a 12 right shift would make a
> nice 1024 microseconds - making sys_now() sys_jiffies return the number of
> "1.024" ms... would that work ?)
No problem, there are not strict timers in a IP stack, after all -2.4%
is even better that some internal RC clocks. That's apply to sys_now,
concerning sys_jiffies there are no requirements at all since it can be
bound to any free running timer.
Sylvain
signature.asc
Description: Digital signature