Showing
5 changed files
with
17 additions
and
0 deletions
src/aes.c
0 → 100644
File mode changed
src/sha-2.c
0 → 100644
File mode changed
src/sha-256.c
0 → 100644
File mode changed
src/timer.c
0 → 100644
1 | +#include <timer.h> | ||
2 | + | ||
3 | +long tic(void){ | ||
4 | + struct timespec time_spec; | ||
5 | + clock_gettime(CLOCK_THREAD_CPUTIME_ID,&time_spec); | ||
6 | + return time_spec.tv_nsec; | ||
7 | +} | ||
8 | + | ||
9 | +long toc(long prev){ | ||
10 | + struct timespec time_spec; | ||
11 | + int now; | ||
12 | + | ||
13 | + now = clock_gettime(CLOCK_THREAD_CPUTIME_ID,&time_spec); | ||
14 | + return time_speck.tv_nsec - prev; | ||
15 | +} | ||
16 | + |
-
Please register or login to post a comment