diff options
author | salaaad2 <arthurdurant263@gmail.com> | 2022-04-03 17:59:14 +0200 |
---|---|---|
committer | salaaad2 <arthurdurant263@gmail.com> | 2022-04-03 17:59:14 +0200 |
commit | f2f7654a416b7ad0715ddf93f635021c62eb6c87 (patch) | |
tree | fd0a7b4b474eb4b411692ed5b0c0b86b2ec3a711 /csrc | |
parent | signing requests (diff) | |
download | smith-f2f7654a416b7ad0715ddf93f635021c62eb6c87.tar.gz smith-f2f7654a416b7ad0715ddf93f635021c62eb6c87.tar.bz2 smith-f2f7654a416b7ad0715ddf93f635021c62eb6c87.tar.xz smith-f2f7654a416b7ad0715ddf93f635021c62eb6c87.tar.zst smith-f2f7654a416b7ad0715ddf93f635021c62eb6c87.zip |
go: trimmed signature switched to termui \nc: added get_timestamp function
Diffstat (limited to 'csrc')
-rw-r--r-- | csrc/smith.c | 12 | ||||
-rw-r--r-- | csrc/smith.h | 3 |
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_ |