summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbnicholes <bnicholes@13f79535-47bb-0310-9956-ffa450edef68>2001-08-06 20:49:17 +0000
committerbnicholes <bnicholes@13f79535-47bb-0310-9956-ffa450edef68>2001-08-06 20:49:17 +0000
commit16833418561c9e0e41c292b55ea0df0d3c199f49 (patch)
tree7dccd50ee35724b4db00242105323b78dff3a40c
parent5b3874c74c193f838fb63c3c11f471750745afd2 (diff)
downloadlibapr-16833418561c9e0e41c292b55ea0df0d3c199f49.tar.gz
Added the NetWare version of get_system_time()
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62108 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--misc/unix/getuuid.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/misc/unix/getuuid.c b/misc/unix/getuuid.c
index 3d8f72cdd..2ecdbd99a 100644
--- a/misc/unix/getuuid.c
+++ b/misc/unix/getuuid.c
@@ -128,6 +128,16 @@ static void get_pseudo_node_identifier(unsigned char *node)
static void get_system_time(apr_uint64_t *uuid_time)
{
+#ifdef NETWARE
+ uint64_t sec;
+ uint64_t usec;
+
+ NXGetTime(NX_SINCE_1970, NX_SECONDS, &sec);
+ NXGetTime(NX_SINCE_1970, NX_USECONDS, &usec);
+ *uuid_time = (sec * 10000000) + (usec * 10) +
+ 0x01B21DD213814000LL;
+EnterDebugger(); /* Check to make sure that we are actually getting what we expect. */
+#else
struct timeval tp;
/* ### fix this call to be more portable? */
@@ -138,6 +148,7 @@ static void get_system_time(apr_uint64_t *uuid_time)
Unix base time is January 1, 1970. */
*uuid_time = (tp.tv_sec * 10000000) + (tp.tv_usec * 10) +
0x01B21DD213814000LL;
+#endif
}
/* true_random -- generate a crypto-quality random number. */