From f20912021865089e1d8676afc497e7263f716aca Mon Sep 17 00:00:00 2001 From: Hideki Miyazaki Date: Thu, 14 Dec 2023 07:35:32 +0900 Subject: [PATCH 1/2] fix benchmark compile error --- wolfcrypt/benchmark/benchmark.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/wolfcrypt/benchmark/benchmark.c b/wolfcrypt/benchmark/benchmark.c index ff492648c..bf0a3209c 100644 --- a/wolfcrypt/benchmark/benchmark.c +++ b/wolfcrypt/benchmark/benchmark.c @@ -12190,7 +12190,6 @@ void bench_sphincsKeySign(byte level, byte optim) /* prototype definition */ int construct_argv(); extern char* __argv[22]; -#endif /* current_time(reset) * @@ -12277,7 +12276,24 @@ void bench_sphincsKeySign(byte level, byte optim) #endif /* configTICK_RATE_HZ */ return ret; + } /* current_time */ +#else + /* current_time(reset) + * + * Benchmark passage of time, in fractional seconds. + * [reset] is non zero to adjust timer or counter to zero + * + * Use care when repeatedly calling calling. See implementation. */ + double current_time(int reset) + { + portTickType tickCount; + /* tick count == ms, if configTICK_RATE_HZ is set to 1000 */ + tickCount = xTaskGetTickCount(); + return (double)tickCount / 1000; + } +#endif + #elif defined (WOLFSSL_TIRTOS) From 3af91c265bb01fc7bc769b6b5716886bbc5ad06c Mon Sep 17 00:00:00 2001 From: Hideki Miyazaki Date: Thu, 14 Dec 2023 11:16:36 +0900 Subject: [PATCH 2/2] remove tab --- wolfcrypt/benchmark/benchmark.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wolfcrypt/benchmark/benchmark.c b/wolfcrypt/benchmark/benchmark.c index bf0a3209c..49803d6d9 100644 --- a/wolfcrypt/benchmark/benchmark.c +++ b/wolfcrypt/benchmark/benchmark.c @@ -12287,7 +12287,7 @@ void bench_sphincsKeySign(byte level, byte optim) * Use care when repeatedly calling calling. See implementation. */ double current_time(int reset) { - portTickType tickCount; + portTickType tickCount; /* tick count == ms, if configTICK_RATE_HZ is set to 1000 */ tickCount = xTaskGetTickCount(); return (double)tickCount / 1000;