ice icon indicating copy to clipboard operation
ice copied to clipboard

Doubts about discarding monotonic time

Open jech opened this issue 1 year ago • 0 comments

Hi,

I'm looking at @paulwe optimisations to pion/ice right now, thanks a lot for the work, Paul.

I have a doubt about commit e1c2d85530f0f9e96935c3598cc68b6c596c1a39, where the lastSent and lastReceived fields of candidateBase have been changed from time.Time to Unix time. In doing so, they no longer contain monotonic time, and therefore become susceptible to stepping clocks.

Paul, can you confirm that this change will not cause trouble if the system clock is stepped? If not, then I suggest that either the commit should be reverted, or we should use a technique similar to what I do in https://github.com/jech/storrent/blob/master/mono/mono.go, where I had exactly the same problem (albeit with just second granularity).

jech avatar May 09 '24 09:05 jech