Files
luban-lite-t3e-pro/bsp/common/include/aic_time.h

37 lines
803 B
C
Raw Normal View History

2023-08-30 16:21:18 +08:00
/*
* Copyright (c) 2022, Artinchip Technology Co., Ltd
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef __AIC_TIME_H__
#define __AIC_TIME_H__
2024-04-03 16:40:57 +08:00
#include <sys/time.h>
2023-08-30 16:21:18 +08:00
#ifdef __cplusplus
extern "C" {
#endif
2024-04-03 16:40:57 +08:00
#define NS_PER_SEC 1000000000
#define US_PER_SEC 1000000
#define MS_PER_SEC 1000
2023-08-30 16:21:18 +08:00
void aic_udelay(u32 us);
void aic_mdelay(u32 ms);
u64 aic_get_ticks(void);
2023-11-30 19:48:02 +08:00
u64 aic_get_time_us(void);
u64 aic_get_time_ms(void);
2023-08-30 16:21:18 +08:00
2024-04-03 16:40:57 +08:00
void gettimespec(struct timespec *t);
float timespec_diff(struct timespec *start, struct timespec *end);
void show_timespec_diff(char *head, char *tail,
struct timespec *start, struct timespec *end);
void show_fps(char *mod, struct timespec *start, struct timespec *end, int cnt);
2023-08-30 16:21:18 +08:00
#ifdef __cplusplus
}
#endif
#endif /* __AIC_TIME_H__ */