multipath-tools: replace <> with "" for local headers
[multipath-tools/.git] / libmultipath / prioritizers / random.c
1 #include <stdio.h>
2 #include <stdlib.h>
3 #include <sys/time.h>
4 #include <time.h>
5
6 #include "prio.h"
7
8 int getprio (struct path * pp, char * args)
9 {
10         struct timeval tv;
11
12         gettimeofday(&tv, NULL);
13         srand((unsigned int)tv.tv_usec);
14         return 1+(int) (10.0*rand()/(RAND_MAX+1.0));
15 }