Example #1
0
int main() {
    for (int i = 0; i< 10; i++) {
        uint64_t ts = time(NULL);
        /*
         *必须加i,这个循环里,ts都是一样的,cpu运行速度太快的原因么
         */
        test_rand(ts + i);

    }
    return 0;
}
Example #2
0
int main(void)
{
    int ret = 0;

    randinit(&state);
    checkpoint_rand("First Random Word: ");

    ret |= test_rand();
    ret |= test_linear();
    ret |= test_quadratic();

    checkpoint_rand("Last Random Word: ");
    randclear(state);

    return ret;
}