Lines Matching defs:random
82 random(void)
517 /* Return a random node in a bucket. */
527 nn = random() % b->count;
552 /* Return a random id within a bucket. */
568 id_return[bit / 8] |= random() & 0xFF >> (bit % 8);
570 id_return[i] = random() & 0xFF;
910 expire_stuff_time = now.tv_sec + 120 + random() % 240;
1390 rotate_secrets_time = now.tv_sec + 900 + random() % 1800;
1653 confirm_nodes_time = now.tv_sec + random() % 3;
1655 search_id = random() & 0xFFFF;
1761 id[19] = random() & 0xFF;
1763 if(q->next && (q->count == 0 || (random() & 7) == 0))
1765 if(q->count == 0 || (random() & 7) == 0) {
1803 time. Pick a random id in this bucket's range, and send
1804 a request to a random node. */
1817 if(q->next && (q->count == 0 || (random() & 7) == 0))
1819 if(q->count == 0 || (random() & 7) == 0) {
1840 else if(random() % 37 == 0)
2142 time_t tm = sr->step_time + 15 + random() % 10;
2168 confirm_nodes_time = now.tv_sec + 5 + random() % 20;
2170 confirm_nodes_time = now.tv_sec + 60 + random() % 120;
2444 j0 = random() % st->numpeers;