mibuild/sim: avoid updating end at each cycle (simulation speedup)
This commit is contained in:
parent
5ec26a49c3
commit
f4b060f6fe
|
@ -115,7 +115,6 @@ void sim_tick(struct sim *s)
|
|||
if (trace)
|
||||
tfp->dump(s->tick);
|
||||
s->tick++;
|
||||
s->end = clock();
|
||||
}
|
||||
|
||||
void sim_init(struct sim *s)
|
||||
|
@ -157,6 +156,7 @@ int main(int argc, char **argv, char **env)
|
|||
s.run = false;
|
||||
}
|
||||
}
|
||||
s.end = clock();
|
||||
|
||||
speed = (s.tick/2)/((s.end-s.start)/CLOCKS_PER_SEC);
|
||||
|
||||
|
|
|
@ -150,7 +150,6 @@ void sim_tick(struct sim *s)
|
|||
if (trace)
|
||||
tfp->dump(s->tick);
|
||||
s->tick++;
|
||||
s->end = clock();
|
||||
}
|
||||
|
||||
void sim_init(struct sim *s)
|
||||
|
@ -193,6 +192,7 @@ int main(int argc, char **argv, char **env)
|
|||
s.run = false;
|
||||
}
|
||||
}
|
||||
s.end = clock();
|
||||
|
||||
tfp->close();
|
||||
pthread_cancel(sim_receive_thread);
|
||||
|
|
Loading…
Reference in New Issue