diff options
-rw-r--r-- | src/lib/crypto/os/ChangeLog | 4 | ||||
-rw-r--r-- | src/lib/crypto/os/c_ustime.c | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/src/lib/crypto/os/ChangeLog b/src/lib/crypto/os/ChangeLog index b0b44f1604..26dc9d4163 100644 --- a/src/lib/crypto/os/ChangeLog +++ b/src/lib/crypto/os/ChangeLog @@ -1,3 +1,7 @@ +Mon Feb 17 17:24:41 1997 Richard Basch <basch@lehman.com> + + * c_ustime.c: Fixed microsecond adjustment code (win32) + Thu Nov 21 00:58:04 EST 1996 Richard Basch <basch@lehman.com> * Makefile.in: Win32 build diff --git a/src/lib/crypto/os/c_ustime.c b/src/lib/crypto/os/c_ustime.c index 57606de10e..350c1aa5c7 100644 --- a/src/lib/crypto/os/c_ustime.c +++ b/src/lib/crypto/os/c_ustime.c @@ -141,10 +141,10 @@ register krb5_int32 *seconds, *microseconds; _ftime(&timeptr); /* Get the current time */ sec = timeptr.time; - usec = timeptr.millitm; + usec = timeptr.millitm * 1000; - if (sec == last_sec) { /* Same as last time??? */ - usec = ++last_usec; /* Yep, so do microseconds */ + if ((sec == last_sec) && (usec <= last_usec)) { /* Same as last time??? */ + usec = ++last_usec; if (usec >= 1000000) { ++sec; usec = 0; |