This commit is contained in:
JiXieShi
2024-11-27 22:11:09 +08:00
parent a0783abd1a
commit 9d10e34746
2 changed files with 13 additions and 11 deletions

View File

@@ -44,7 +44,10 @@ void exampleTimer4Callback(Task_t *task, void *userData) {
#undef LOG_RUN_TIMER_FUN
#define LOG_RUN_TIMER_FUN GetTick()
int Test_task(void *pVoid) {
LOG_RUN_TIME() {
LOG_RUN_TIME("Init Timer", {
printf("%llu", __time_count__);
}) {
TaskInit(GetTick);
TaskCreat(task1, 1000, -1, exampleTimer1Callback, "1000ms CYCLE task");
TaskCreat(task2, 5000, -1, exampleTimer2Callback, "5000ms ONCE task");
@@ -56,7 +59,6 @@ int Test_task(void *pVoid) {
TaskCreat(task4, 2000, 1, exampleTimer4Callback, &customUserData);
}
while (1) {
TaskRun();
}