diff options
author | Richard Basch <probe@mit.edu> | 1997-02-18 05:40:06 +0000 |
---|---|---|
committer | Richard Basch <probe@mit.edu> | 1997-02-18 05:40:06 +0000 |
commit | 84edd2438b718f0617bf1adb3723a463070cbd7b (patch) | |
tree | cff0de480fce3c6cae70868e44c69d8f37cb5090 /src/lib/crypto/os/c_ustime.c | |
parent | 663c3cd21ebb5e5799ba440334f21abd3f5cb99f (diff) | |
download | krb5-84edd2438b718f0617bf1adb3723a463070cbd7b.tar.gz krb5-84edd2438b718f0617bf1adb3723a463070cbd7b.tar.xz krb5-84edd2438b718f0617bf1adb3723a463070cbd7b.zip |
Fixed the microsecond adjustment for Windows
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@9882 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/crypto/os/c_ustime.c')
-rw-r--r-- | src/lib/crypto/os/c_ustime.c | 6 |
1 files changed, 3 insertions, 3 deletions
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; |