diff --git a/INSTALL b/INSTALL index bc76ddd2..c63ddb6c 100644 --- a/INSTALL +++ b/INSTALL @@ -6,7 +6,7 @@ As root or user type: ./configure make -When you have to check for correctness the application simply typing: +When you have to check for correctness the application typing: make check @@ -19,7 +19,7 @@ To start using SnapRAID you have to change the example configuration file snapraid.conf.example to fit your needs and copy it in /etc/snapraid.conf To get more help, see the "Getting Started" section in the snapraid manpage -simply typing: +typing: man snapraid diff --git a/speed.c b/speed.c index 3288d28e..a098ed5f 100644 --- a/speed.c +++ b/speed.c @@ -22,6 +22,33 @@ #include "raid.h" #include "cpu.h" +/** + * Differential us of two timeval. + */ +static int64_t diffgettimeofday(struct timeval* start, struct timeval* stop) +{ + return 1000000LL * (stop->tv_sec - start->tv_sec) + stop->tv_usec - start->tv_usec; +} + +/** + * Start time measurement. + */ +#define SPEED_START \ + count = 0; \ + gettimeofday(&start, 0); \ + do { \ + for(i=0;i