Localize the OS-specific bits of retrieving the current time a bit more.
authorKen Raeburn <raeburn@mit.edu>
Tue, 15 Jun 2004 19:06:13 +0000 (19:06 +0000)
committerKen Raeburn <raeburn@mit.edu>
Tue, 15 Jun 2004 19:06:13 +0000 (19:06 +0000)
commit44c6352e5710e98929e915f5526050a396e61275
treee323f380d74901019a10fcaea00a4fe7b187f1fb
parent66bf4d0698aa144e7e1365c2c8ece251bc7c0d99
Localize the OS-specific bits of retrieving the current time a bit more.
** not yet tested on Windows **

* c_ustime.c: Include k5-thread.h.
(get_time_now): New function, holds system-dependent code.
(krb5int_us_time_mutex): New mutex.
(struct time_now): New type.
(last_time): New variable, replaces old last_tv, last_sec, last_usec.
(krb5_crypto_us_timeofday): Rewrite.  Do locking around access to previously
returned value, and ensure that we don't return duplicate values.
* os-proto.h: Include k5-thread.h.
(krb5int_us_time_mutex): Declare.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16454 dc483132-0cff-0310-8789-dd5450dbe970
src/lib/krb5/os/ChangeLog
src/lib/krb5/os/c_ustime.c
src/lib/krb5/os/os-proto.h