RT-Thread RTOS 1.2.0
An open source embedded real-time operating system
载入中...
搜索中...
未找到
cputime.h
浏览该文件的文档.
1/*
2 * Copyright (c) 2006-2023, RT-Thread Development Team
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 *
6 * Change Logs:
7 * Date Author Notes
8 * 2017-12-23 Bernard first version
9 */
10
11#ifndef CPUTIME_H__
12#define CPUTIME_H__
13
14#include <stdint.h>
15#include "cputimer.h"
16
18{
19 uint64_t (*cputime_getres)(void);
20 uint64_t (*cputime_gettime)(void);
21 int (*cputime_settimeout)(uint64_t tick, void (*timeout)(void *param), void *param);
22};
23
24uint64_t clock_cpu_getres(void);
25uint64_t clock_cpu_gettime(void);
26int clock_cpu_settimeout(uint64_t tick, void (*timeout)(void *param), void *param);
28
29uint64_t clock_cpu_microsecond(uint64_t cpu_tick);
30uint64_t clock_cpu_millisecond(uint64_t cpu_tick);
31
33
34#ifdef RT_USING_CPUTIME_RISCV
35int riscv_cputime_init(void);
36#endif /* RT_USING_CPUTIME_RISCV */
37
38#endif
int clock_cpu_settimeout(uint64_t tick, void(*timeout)(void *param), void *param)
int clock_cpu_setops(const struct rt_clock_cputime_ops *ops)
uint64_t clock_cpu_getres(void)
uint64_t clock_cpu_millisecond(uint64_t cpu_tick)
uint64_t clock_cpu_microsecond(uint64_t cpu_tick)
int clock_cpu_issettimeout(void)
uint64_t clock_cpu_gettime(void)
int(* cputime_settimeout)(uint64_t tick, void(*timeout)(void *param), void *param)
uint64_t(* cputime_getres)(void)
uint64_t(* cputime_gettime)(void)