Skip to content

Commit 6feea35

Browse files
authored
Merge pull request #5313 from aozima/aozima_cputime
cputime数据类型修改为64位
2 parents 19eb394 + c2fec1b commit 6feea35

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

components/drivers/cputime/cputime.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ float clock_cpu_getres(void)
3434
*
3535
* @return the cpu tick
3636
*/
37-
uint32_t clock_cpu_gettime(void)
37+
uint64_t clock_cpu_gettime(void)
3838
{
3939
if (_cputime_ops)
4040
return _cputime_ops->cputime_gettime();

components/drivers/cputime/cputime_cortexm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ static float cortexm_cputime_getres(void)
2424
return ret;
2525
}
2626

27-
static uint32_t cortexm_cputime_gettime(void)
27+
static uint64_t cortexm_cputime_gettime(void)
2828
{
2929
return DWT->CYCCNT;
3030
}

components/drivers/include/drivers/cputime.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@
1616
struct rt_clock_cputime_ops
1717
{
1818
float (*cputime_getres) (void);
19-
uint32_t (*cputime_gettime)(void);
19+
uint64_t (*cputime_gettime)(void);
2020
};
2121

2222
float clock_cpu_getres(void);
23-
uint32_t clock_cpu_gettime(void);
23+
uint64_t clock_cpu_gettime(void);
2424

2525
uint32_t clock_cpu_microsecond(uint32_t cpu_tick);
2626
uint32_t clock_cpu_millisecond(uint32_t cpu_tick);

0 commit comments

Comments
 (0)