30 int fd = open(file, O_RDONLY);
35 err = read(fd, dst,
sizeof(*dst));
47 float s = 0.000000000001;
49 for (i = 0; bits < 64; i++) {
51 if (last_t && fabs(t - last_t) > s || t == (clock_t) -1) {
52 if (i < 10000 && s < (1 << 24)) {
56 random = 2 * random + (i & 1);
68 random += random >> 32;
77 if (
read_random(&seed,
"/dev/urandom") ==
sizeof(seed))
79 if (
read_random(&seed,
"/dev/random") ==
sizeof(seed))