aboutsummaryrefslogtreecommitdiffstats
path: root/csrc
diff options
context:
space:
mode:
Diffstat (limited to 'csrc')
-rw-r--r--csrc/smith.c12
-rw-r--r--csrc/smith.h3
2 files changed, 14 insertions, 1 deletions
diff --git a/csrc/smith.c b/csrc/smith.c
index 4ff5553..369bdd0 100644
--- a/csrc/smith.c
+++ b/csrc/smith.c
@@ -7,9 +7,21 @@
/*********************************/
#include "smith.h"
+#include <sys/time.h>
char *
mr_smith()
{
return ("---SMITH_V0.0.0---");
}
+
+long
+c_get_timestamp()
+{
+ struct timeval tv;
+ long ct;
+
+ gettimeofday(&tv, NULL);
+ ct = ((tv.tv_sec * 1000) + (tv.tv_usec / 1000));
+ return (ct);
+}
diff --git a/csrc/smith.h b/csrc/smith.h
index 489c053..4401da9 100644
--- a/csrc/smith.h
+++ b/csrc/smith.h
@@ -11,6 +11,7 @@
#include <unistd.h>
-char * mr_smith();
+char * c_mr_smith();
+long c_get_timestamp();
#endif // SMITH_H_