From f2f7654a416b7ad0715ddf93f635021c62eb6c87 Mon Sep 17 00:00:00 2001 From: salaaad2 Date: Sun, 3 Apr 2022 17:59:14 +0200 Subject: go: trimmed signature switched to termui \nc: added get_timestamp function --- csrc/smith.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'csrc/smith.c') 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 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); +} -- cgit v1.2.3