From 725167e3d9a8740ac167508aec4e27be53a04f02 Mon Sep 17 00:00:00 2001 From: salaaad2 Date: Mon, 4 Apr 2022 22:38:05 +0200 Subject: cool ui and functioning requests, what can a man ask for (v0.0.1) --- csrc/smith.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'csrc/smith.c') diff --git a/csrc/smith.c b/csrc/smith.c index 5ac1e73..3643abd 100644 --- a/csrc/smith.c +++ b/csrc/smith.c @@ -8,6 +8,8 @@ #include "smith.h" #include +#include +#include char * mr_smith() @@ -15,13 +17,16 @@ mr_smith() return ("---SMITH_V0.0.0---"); } -long +char* get_timestamp() { struct timeval tv; long ct; + char * buffer; + buffer = (char*)malloc(30); gettimeofday(&tv, NULL); ct = ((tv.tv_sec * 1000) + (tv.tv_usec / 1000)); - return (ct); + sprintf(buffer, "%ld", ct); + return buffer; } -- cgit v1.2.3