forked from gary/ems
2
0
Fork 0
sun_ems/ems_c/kernel/kit_time2.h

35 lines
933 B
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*****************************************************************************
* @copyright 2024-202, . POWER SUPPLY CO., LTD.
* @file xxx.c
* @brief xxxx
* @author xx
* @date 2024/08/30
* @remark 初修订
*****************************************************************************/
// 由于BSU模块也有这个文件所以重命名之后BSU独立后会合并
#ifndef __INCLUDE_KIT_TIME_H__
#define __INCLUDE_KIT_TIME_H__
#ifndef __USE_GNU
#define __USE_GNU
#endif
#include <sys/time.h>
#include <stdio.h>
#include <stdbool.h>
#include <string.h>
#include <stdint.h>
#include <stdlib.h>
#include <bits/types/struct_timespec.h>
#include <time.h>
uint8_t kit_isTimeout_by_now(struct timeval *lasttime,uint32_t timeout_ms);
uint32_t kit_time_diff_ms(struct timeval nowtime, struct timeval lasttime);
uint64_t get_systicks(struct timeval *tv);
#endif