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 ++++++++++++ csrc/smith.h | 3 ++- 2 files changed, 14 insertions(+), 1 deletion(-) (limited to 'csrc') 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); +} 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 -char * mr_smith(); +char * c_mr_smith(); +long c_get_timestamp(); #endif // SMITH_H_ -- cgit v1.2.3