Merge pull request #5313 from aozima/aozima_cputime

cputime数据类型修改为64位
This commit is contained in:
Bernard Xiong 2021-12-04 22:57:37 +08:00 committed by GitHub
commit 6feea35e95
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -34,7 +34,7 @@ float clock_cpu_getres(void)
*
* @return the cpu tick
*/
uint32_t clock_cpu_gettime(void)
uint64_t clock_cpu_gettime(void)
{
if (_cputime_ops)
return _cputime_ops->cputime_gettime();

View File

@ -24,7 +24,7 @@ static float cortexm_cputime_getres(void)
return ret;
}
static uint32_t cortexm_cputime_gettime(void)
static uint64_t cortexm_cputime_gettime(void)
{
return DWT->CYCCNT;
}

View File

@ -16,11 +16,11 @@
struct rt_clock_cputime_ops
{
float (*cputime_getres) (void);
uint32_t (*cputime_gettime)(void);
uint64_t (*cputime_gettime)(void);
};
float clock_cpu_getres(void);
uint32_t clock_cpu_gettime(void);
uint64_t clock_cpu_gettime(void);
uint32_t clock_cpu_microsecond(uint32_t cpu_tick);
uint32_t clock_cpu_millisecond(uint32_t cpu_tick);