add gaussian fake random value

This commit is contained in:
tTh
2018-12-06 21:06:34 +01:00
parent 8da6c9ffd6
commit 94f95655c1
2 changed files with 20 additions and 6 deletions

View File

@@ -14,12 +14,14 @@ int verbosity;
int main(int argc, char *argv[])
{
int opt;
int opt;
int type = 0;
while ((opt = getopt(argc, argv, "vs")) != -1) {
while ((opt = getopt(argc, argv, "vst:")) != -1) {
switch (opt) {
case 'v': verbosity++; break;
case 's': srand(getpid()); break;
case 't': type = atoi(optarg); break;
default: break;
}
}
@@ -29,7 +31,7 @@ if (verbosity > 1) {
}
printf("%f %d\n", dtime(), random1000(0));
printf("%f %d\n", dtime(), random1000(type));
return 0;
}