arch: Add up_perf_getfreq function

it's important to know the perf count frequency

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao
2022-01-26 02:07:43 +08:00
committed by Alan Carvalho de Assis
parent 8be9cb9f72
commit ecccc614bd
5 changed files with 29 additions and 0 deletions
+5
View File
@@ -388,6 +388,11 @@ uint32_t weak_function up_perf_gettime(void)
return ret;
}
uint32_t weak_function up_perf_getfreq(void)
{
return USEC_PER_SEC;
}
void weak_function up_perf_convert(uint32_t elapsed, FAR struct timespec *ts)
{
timespec_from_usec(ts, elapsed);
+5
View File
@@ -437,6 +437,11 @@ uint32_t weak_function up_perf_gettime(void)
return ret;
}
uint32_t weak_function up_perf_getfreq(void)
{
return USEC_PER_SEC;
}
void weak_function up_perf_convert(uint32_t elapsed, FAR struct timespec *ts)
{
timespec_from_usec(ts, elapsed);