From 62e097708d79a5a4858331635c0006cee6e85467 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 25 Oct 2016 19:12:05 -0300 Subject: [PATCH] test --- src/komodo_utils.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/komodo_utils.h b/src/komodo_utils.h index d8d742eb8..e1b0fd223 100644 --- a/src/komodo_utils.h +++ b/src/komodo_utils.h @@ -1015,3 +1015,12 @@ void komodo_configfile(char *symbol,uint16_t port) } else printf("couldnt open.(%s)\n",fname); } } + +double OS_milliseconds() +{ + struct timeval tv; double millis; + gettimeofday(&tv,NULL); + millis = ((double)tv.tv_sec * 1000. + (double)tv.tv_usec / 1000.); + //printf("tv_sec.%ld usec.%d %f\n",tv.tv_sec,tv.tv_usec,millis); + return(millis); +} \ No newline at end of file