diff options
author | salaaad2 <arthurdurant263@gmail.com> | 2022-04-04 22:38:05 +0200 |
---|---|---|
committer | salaaad2 <arthurdurant263@gmail.com> | 2022-04-04 22:38:05 +0200 |
commit | 725167e3d9a8740ac167508aec4e27be53a04f02 (patch) | |
tree | d71a2a55a5b5ea601ee68bab2210eb499fa84c36 /csrc/smith.c | |
parent | amazing ui work brother, it is hot here or is it just me \? (diff) | |
download | smith-725167e3d9a8740ac167508aec4e27be53a04f02.tar.gz smith-725167e3d9a8740ac167508aec4e27be53a04f02.tar.bz2 smith-725167e3d9a8740ac167508aec4e27be53a04f02.tar.xz smith-725167e3d9a8740ac167508aec4e27be53a04f02.tar.zst smith-725167e3d9a8740ac167508aec4e27be53a04f02.zip |
cool ui and functioning requests, what can a man ask for (v0.0.1)
Diffstat (limited to 'csrc/smith.c')
-rw-r--r-- | csrc/smith.c | 9 |
1 files changed, 7 insertions, 2 deletions
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 <sys/time.h> +#include <stdio.h> +#include <stdlib.h> 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; } |