Skip to content

Commit

Permalink
docs(profiler): remove tick unit (lvgl#7433)
Browse files Browse the repository at this point in the history
Signed-off-by: pengyiqiang <[email protected]>
Co-authored-by: pengyiqiang <[email protected]>
  • Loading branch information
FASTSHIFT and pengyiqiang authored Dec 10, 2024
1 parent 99a785c commit 2209e3a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/details/debugging/profiler.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ To enable the profiler, set :c:macro:`LV_USE_PROFILER` in ``lv_conf.h`` and conf
#include <time.h>
#include <unistd.h>
static uint64_t my_get_tick_us_cb(void)
static uint64_t my_get_tick_cb(void)
{
struct timespec ts;
clock_gettime(CLOCK_MONOTONIC, &ts);
Expand All @@ -71,7 +71,7 @@ To enable the profiler, set :c:macro:`LV_USE_PROFILER` in ``lv_conf.h`` and conf
lv_profiler_builtin_config_t config;
lv_profiler_builtin_config_init(&config);
config.tick_per_sec = 1000000000; /* One second is equal to 1000000000 nanoseconds */
config.tick_get_cb = my_get_tick_us_cb;
config.tick_get_cb = my_get_tick_cb;
config.tid_get_cb = my_get_tid_cb;
config.cpu_get_cb = my_get_cpu_cb;
lv_profiler_builtin_init(&config);
Expand All @@ -81,7 +81,7 @@ To enable the profiler, set :c:macro:`LV_USE_PROFILER` in ``lv_conf.h`` and conf

.. code-block:: c
static uint64_t my_get_tick_us_cb(void)
static uint64_t my_get_tick_cb(void)
{
/* Use the microsecond time stamp provided by Arduino */
return micros();
Expand All @@ -92,7 +92,7 @@ To enable the profiler, set :c:macro:`LV_USE_PROFILER` in ``lv_conf.h`` and conf
lv_profiler_builtin_config_t config;
lv_profiler_builtin_config_init(&config);
config.tick_per_sec = 1000000; /* One second is equal to 1000000 microseconds */
config.tick_get_cb = my_get_tick_us_cb;
config.tick_get_cb = my_get_tick_cb;
lv_profiler_builtin_init(&config);
}
Expand Down

0 comments on commit 2209e3a

Please sign in to comment.