Skip to content

Commit 299a964

Browse files
committed
Give RT1060 a current_time so the benchmark stops needing clock_gettime
1 parent 231c07b commit 299a964

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

RT1060/common.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@ void SysTick_Handler(void)
2323
g_systickCounter++;
2424
}
2525

26+
/* benchmark.c's generic branch calls clock_gettime, which this board has no
27+
* implementation for; WOLFSSL_USER_CURRTIME routes it here instead. */
28+
double current_time(int reset)
29+
{
30+
(void)reset;
31+
return (double)g_systickCounter / 1000.0;
32+
}
33+
2634
int32_t cust_rand_generate_block(uint8_t *rndb, uint32_t sz)
2735
{
2836
status_t status;

RT1060/user_settings.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
#define WOLFCRYPT_ONLY
3535
#define SIZEOF_LONG_LONG 8
3636
#define BENCH_EMBEDDED
37+
#define WOLFSSL_USER_CURRTIME
3738
#define NO_WOLFSSL_MEMORY
3839

3940
int32_t cust_rand_generate_block(uint8_t *rndb, uint32_t sz);

0 commit comments

Comments
 (0)