1config RT_USING_CPUTIME
2    bool "Enable CPU time for high resolution clock counter"
3    default n
4    help
5        When enable this option, the BSP should provide a rt_clock_cputime_ops
6        for CPU time by:
7        const static struct rt_clock_cputime_ops _ops = {...};
8        clock_cpu_setops(&_ops);
9
10        Then user can use high resolution clock counter with:
11
12        ts1 = clock_cpu_gettime();
13        ts2 = clock_cpu_gettime();
14
15        /* and get the ms of delta tick with API: */
16        ms_tick = clock_cpu_millisecond(t2 - t1);
17        us_tick = clock_cpu_microsecond(t2 - t1);
18
19if RT_USING_CPUTIME
20    config RT_USING_CPUTIME_CORTEXM
21        bool "Support Cortex-M CPU"
22        default y
23        depends on ARCH_ARM_CORTEX_M0 || ARCH_ARM_CORTEX_M3 || ARCH_ARM_CORTEX_M4 || ARCH_ARM_CORTEX_M7
24        select PKG_USING_PERF_COUNTER
25    config RT_USING_CPUTIME_RISCV
26        bool "Use rdtime instructions for CPU time"
27        default y
28        depends on ARCH_RISCV64
29        help
30            Some RISCV64 MCU Use rdtime instructions read CPU time.
31    config CPUTIME_TIMER_FREQ
32        int "CPUTIME timer freq"
33        default 0
34endif
35