This has changed in recent gccs. It doesn't force register pairs anymore.
Given the code is still not that good, but some of the worst sins are gone
If you define an appropiate window and use some macros for the comparisons
it shouldn't be a big problem.
gettimeofday() has too strict requirements, that make it unnecessarily slow
for this task.
You don't need to recompute keys; just use careful comparisons using
subtractions and a window. TCPs have done that for decades.
If you're worried about wrapping in one hour why is wrapping in two
hours not a problem?
I have one request though. If anybody adds anything complicated
for this please make it optional so that 64bit platforms are not
burdened by it.
-Andi
-