From 2f7970ab6551b5de5d46b4bf2859230d1daa8e6f Mon Sep 17 00:00:00 2001 From: Chris Conlon Date: Wed, 20 Nov 2013 17:03:58 -0700 Subject: [PATCH] add FREERTOS current_time() to benchmark.c --- ctaocrypt/benchmark/benchmark.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/ctaocrypt/benchmark/benchmark.c b/ctaocrypt/benchmark/benchmark.c index f1264a7c7..64e85327e 100644 --- a/ctaocrypt/benchmark/benchmark.c +++ b/ctaocrypt/benchmark/benchmark.c @@ -1087,7 +1087,22 @@ void bench_eccKeyAgree(void) } #elif defined CYASSL_MDK_ARM + extern double current_time(int reset) ; + +#elif defined FREERTOS + + double current_time(int reset) + { + (void) reset; + + portTickType tickCount; + + /* tick count == ms, if configTICK_RATE_HZ is set to 1000 */ + tickCount = xTaskGetTickCount(); + return (double)tickCount / 1000; + } + #else #include