diff options
author | A404M <ahmadmahmoudiprogrammer@gmail.com> | 2024-09-18 19:46:38 +0330 |
---|---|---|
committer | A404M <ahmadmahmoudiprogrammer@gmail.com> | 2024-09-18 19:57:20 +0330 |
commit | d6ba30b94a24607bce5db5e706eb20cc051a98f0 (patch) | |
tree | 146e74b0bc2e1636451257015210e3c7d1a0ecab /src/utils/time.c |
initial commit
Diffstat (limited to 'src/utils/time.c')
-rw-r--r-- | src/utils/time.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/utils/time.c b/src/utils/time.c new file mode 100644 index 0000000..729e26f --- /dev/null +++ b/src/utils/time.c @@ -0,0 +1,9 @@ +#include "time.h" +#include <bits/time.h> +#include <time.h> + +Clock getTimeInNano(){ + struct timespec t; + clock_gettime(CLOCK_MONOTONIC, &t); + return t.tv_sec*1000000000+t.tv_nsec; +} |