summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/krb5/os/ustime.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/krb5/os/ustime.c b/src/lib/krb5/os/ustime.c
index 974e942cc..65146492f 100644
--- a/src/lib/krb5/os/ustime.c
+++ b/src/lib/krb5/os/ustime.c
@@ -24,6 +24,8 @@ static char rcsid_mstime_c[] =
extern int errno;
+static struct timeval last_tv = {0, 0};
+
krb5_error_code
krb5_us_timeofday(seconds, microseconds)
register krb5_int32 *seconds, *microseconds;
@@ -34,6 +36,11 @@ register krb5_int32 *seconds, *microseconds;
/* failed, return errno */
return (krb5_error_code) errno;
}
+ if ((tv.tv_sec == last_tv.tv_sec) && (tv.tv_usec == last_tv.tv_usec))
+ tv.tv_usec = ++last_tv.tv_usec;
+ else
+ last_tv = tv;
+
*seconds = tv.tv_sec;
*microseconds = tv.tv_usec;
return 0;