timing: create reproducable results

This commit is contained in:
Steffen Jaeckel 2015-12-12 18:15:04 +01:00
parent ed8e8fdb0a
commit 68a360ab7f

View File

@ -11,6 +11,12 @@ ulong64 _tt;
#define SLEEP
#endif
#ifdef LTM_TIMING_REAL_RAND
#define LTM_TIMING_RAND_SEED time(NULL)
#else
#define LTM_TIMING_RAND_SEED 23
#endif
void ndraw(mp_int * a, char *name)
{
@ -108,7 +114,7 @@ int main(void)
mp_init(&e);
mp_init(&f);
srand(time(NULL));
srand(LTM_TIMING_RAND_SEED);
CLK_PER_SEC = TIMFUNC();