Skip to content

Commit

Permalink
timing: create reproducable results
Browse files Browse the repository at this point in the history
  • Loading branch information
sjaeckel committed Dec 12, 2015
1 parent ed8e8fd commit 68a360a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion demo/timing.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 68a360a

Please sign in to comment.