summaryrefslogtreecommitdiff
path: root/src/helper/time_support.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/helper/time_support.c')
-rw-r--r--src/helper/time_support.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/helper/time_support.c b/src/helper/time_support.c
index f772d2f4..26774614 100644
--- a/src/helper/time_support.c
+++ b/src/helper/time_support.c
@@ -111,3 +111,18 @@ int duration_stop_measure(duration_t *duration, char **text)
return ERROR_OK;
}
+
+
+
+
+long long timeval_ms()
+{
+ struct timeval now;
+ long long t=0;
+ gettimeofday(&now, NULL);
+
+ t+=now.tv_usec/1000;
+ t+=now.tv_sec*1000;
+
+ return t;
+}