@@ -16,7 +16,7 @@ static struct timerel const_time_test(struct secret *s1,
1616 struct secret * s2 ,
1717 size_t off )
1818{
19- struct timeabs start , end ;
19+ struct timemono start , end ;
2020 int result = 0 ;
2121
2222 memset (s1 , 0 , RUNS * sizeof (* s1 ));
@@ -25,16 +25,16 @@ static struct timerel const_time_test(struct secret *s1,
2525 for (size_t i = 0 ; i < RUNS ; i ++ )
2626 s2 [i ].data [off ] = i ;
2727
28- start = time_now ();
28+ start = time_mono ();
2929 for (size_t i = 0 ; i < RUNS ; i ++ )
3030 result += secret_eq_consttime (& s1 [i ], & s2 [i ]);
31- end = time_now ();
31+ end = time_mono ();
3232
3333 if (result != RUNS / 256 )
3434 errx (1 , "Expected %u successes at offset %zu, not %u!" ,
3535 RUNS / 256 , off , result );
3636
37- return time_between (end , start );
37+ return timemono_between (end , start );
3838}
3939
4040static inline bool secret_eq_nonconst (const struct secret * a ,
@@ -47,7 +47,7 @@ static struct timerel nonconst_time_test(struct secret *s1,
4747 struct secret * s2 ,
4848 size_t off )
4949{
50- struct timeabs start , end ;
50+ struct timemono start , end ;
5151 int result = 0 ;
5252
5353 memset (s1 , 0 , RUNS * sizeof (* s1 ));
@@ -56,16 +56,16 @@ static struct timerel nonconst_time_test(struct secret *s1,
5656 for (size_t i = 0 ; i < RUNS ; i ++ )
5757 s2 [i ].data [off ] = i ;
5858
59- start = time_now ();
59+ start = time_mono ();
6060 for (size_t i = 0 ; i < RUNS ; i ++ )
6161 result += secret_eq_nonconst (& s1 [i ], & s2 [i ]);
62- end = time_now ();
62+ end = time_mono ();
6363
6464 if (result != RUNS / 256 )
6565 errx (1 , "Expected %u successes at offset %zu, not %u!" ,
6666 RUNS / 256 , off , result );
6767
68- return time_between (end , start );
68+ return timemono_between (end , start );
6969}
7070
7171static struct secret * s1 , * s2 ;
0 commit comments