summaryrefslogtreecommitdiff
path: root/innobase/ut
diff options
context:
space:
mode:
Diffstat (limited to 'innobase/ut')
-rw-r--r--innobase/ut/ut0mem.c4
-rw-r--r--innobase/ut/ut0ut.c22
2 files changed, 25 insertions, 1 deletions
diff --git a/innobase/ut/ut0mem.c b/innobase/ut/ut0mem.c
index 6ed61b0b5de..9e026ed0011 100644
--- a/innobase/ut/ut0mem.c
+++ b/innobase/ut/ut0mem.c
@@ -88,7 +88,9 @@ ut_malloc_low(
"InnoDB: Check if you should increase the swap file or\n"
"InnoDB: ulimits of your operating system.\n"
"InnoDB: On FreeBSD check you have compiled the OS with\n"
- "InnoDB: a big enough maximum process size.\n",
+ "InnoDB: a big enough maximum process size.\n"
+ "InnoDB: Note that in most 32-bit computers the process\n"
+ "InnoDB: memory space is limited to 2 GB or 4 GB.\n",
(ulong) n, (ulong) ut_total_allocated_memory,
#ifdef __WIN__
(ulong) GetLastError()
diff --git a/innobase/ut/ut0ut.c b/innobase/ut/ut0ut.c
index 18722149a8f..ee94c756959 100644
--- a/innobase/ut/ut0ut.c
+++ b/innobase/ut/ut0ut.c
@@ -74,6 +74,28 @@ ut_time(void)
}
/**************************************************************
+Returns system time. */
+
+void
+ut_usectime(
+/*========*/
+ ulint* sec, /* out: seconds since the Epoch */
+ ulint* ms) /* out: microseconds since the Epoch+*sec */
+{
+#ifdef __WIN__
+ SYSTEMTIME st;
+ GetLocalTime(&st);
+ *sec = (ulint) st.wSecond;
+ *ms = (ulint) st.wMilliseconds;
+#else
+ struct timeval tv;
+ gettimeofday(&tv,NULL);
+ *sec = (ulint) tv.tv_sec;
+ *ms = (ulint) tv.tv_usec;
+#endif
+}
+
+/**************************************************************
Returns the difference of two times in seconds. */
double