[app][fibo] print total time taken to run test
This commit is contained in:
@@ -73,13 +73,18 @@ int fibo(int argc, const cmd_args *argv)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
lk_time_t tim = current_time();
|
||||||
|
|
||||||
thread_t *t = thread_create("fibo", &fibo_thread, (void *)(uintptr_t)argv[1].u, DEFAULT_PRIORITY, DEFAULT_STACK_SIZE);
|
thread_t *t = thread_create("fibo", &fibo_thread, (void *)(uintptr_t)argv[1].u, DEFAULT_PRIORITY, DEFAULT_STACK_SIZE);
|
||||||
thread_resume(t);
|
thread_resume(t);
|
||||||
|
|
||||||
int retcode;
|
int retcode;
|
||||||
thread_join(t, &retcode, INFINITE_TIME);
|
thread_join(t, &retcode, INFINITE_TIME);
|
||||||
|
|
||||||
|
tim = current_time() - tim;
|
||||||
|
|
||||||
printf("fibo %d\n", retcode);
|
printf("fibo %d\n", retcode);
|
||||||
|
printf("took %u msecs to calculate\n", tim);
|
||||||
|
|
||||||
return NO_ERROR;
|
return NO_ERROR;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user