]> asedeno.scripts.mit.edu Git - PuTTY.git/commit - unix/uxsftp.c
Two related changes to timing code:
authorBen Harris <bjh21@bjh21.me.uk>
Tue, 18 Sep 2012 21:42:48 +0000 (21:42 +0000)
committerBen Harris <bjh21@bjh21.me.uk>
Tue, 18 Sep 2012 21:42:48 +0000 (21:42 +0000)
commitd5836982e23d8a6176114e1073469950c4eaae37
treeb344643ad357bda82ec7d8220723a7c9818886db
parent41ad182710a8b8bde5bb27114631a25dae37c6cf
Two related changes to timing code:

First, make absolute times unsigned.  This means that it's safe to
depend on their overflow behaviour (which is undefined for signed
integers).  This requires a little extra care in handling comparisons,
but I think I've correctly adjusted them all.

Second, functions registered with schedule_timer() are guaranteed to be
called with precisely the time that was returned by schedule_timer().
Thus, it's only necessary to check these values for equality rather than
doing risky range checks, so do that.

The timing code still does lots that's undefined, unnecessary, or just
wrong, but this is a good start.

[originally from svn r9667]
16 files changed:
notiming.c
pinger.c
putty.h
ssh.c
sshrand.c
terminal.c
timing.c
unix/gtkwin.c
unix/uxcons.c
unix/uxplink.c
unix/uxsftp.c
windows/wincons.c
windows/window.c
windows/winplink.c
windows/winser.c
windows/winsftp.c