add FREERTOS current_time() to benchmark.c

This commit is contained in:
Chris Conlon 2013-11-20 17:03:58 -07:00
parent 864b25843e
commit 2f7970ab65

View File

@ -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 <sys/time.h>