summaryrefslogtreecommitdiffstats
path: root/openmp/runtime/src/z_Linux_util.c
diff options
context:
space:
mode:
Diffstat (limited to 'openmp/runtime/src/z_Linux_util.c')
-rw-r--r--openmp/runtime/src/z_Linux_util.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/openmp/runtime/src/z_Linux_util.c b/openmp/runtime/src/z_Linux_util.c
index b304df06965..16fc1c9ce98 100644
--- a/openmp/runtime/src/z_Linux_util.c
+++ b/openmp/runtime/src/z_Linux_util.c
@@ -2211,6 +2211,15 @@ __kmp_elapsed_tick( double *t )
*t = 1 / (double) CLOCKS_PER_SEC;
}
+/* Return the current time stamp in nsec */
+kmp_uint64
+__kmp_now_nsec()
+{
+ struct timeval t;
+ gettimeofday(&t, NULL);
+ return KMP_NSEC_PER_SEC*t.tv_sec + 1000*t.tv_usec;
+}
+
/*
Determine whether the given address is mapped into the current address space.
*/
OpenPOWER on IntegriCloud