Date:2012-12-09 20:32:17 (6 years 9 months ago)
Author:Werner Almesberger
Commit:95cfa9202c0e6152606d76ef38292d887d90d5da
Message:tornado/fw/sim/alg.c: take duration of simulation from command line

Files: tornado/fw/sim/alg.c (1 diff)

Change Details

tornado/fw/sim/alg.c
6767}
6868
6969
70int main(void)
70static void usage(const char *name)
7171{
72    fprintf(stderr, "usage: %s [seconds]\n", name);
73    exit(1);
74}
75
76
77int main(int argc, char **argv)
78{
79    double t;
80    char *end;
7281    int i;
7382
74    for (i = 0; i != 10*S; i++) {
83    if (argc != 2)
84        usage(*argv);
85    t = strtod(argv[1], &end);
86    if (*end)
87        usage(*argv);
88    for (i = 0; i != t*S; i++) {
7589        unsigned v = sample((double) i/S);
7690
7791        process(v);

Archive Download the corresponding diff file

Branches:
master
tornado-v1



interactive