mirror of
https://github.com/GorgonMeducer/perf_counter.git
synced 2025-02-07 19:34:18 +08:00
rename perfc_port_get_system_freq() to perfc_port_get_system_timer_freq()
This commit is contained in:
parent
1dbdf7a380
commit
1fb9c8a1ed
@ -73,7 +73,6 @@ volatile static uint32_t s_wMSResidule = 0;
|
||||
volatile static uint32_t s_wUSResidule = 0;
|
||||
volatile static int64_t s_lSystemMS = 0;
|
||||
volatile static int64_t s_lSystemUS = 0;
|
||||
volatile static int64_t s_lEventRecorderOffset = 0;
|
||||
|
||||
volatile static int64_t s_lSystemClockCounts = 0;
|
||||
|
||||
@ -81,7 +80,7 @@ volatile static int64_t s_lSystemClockCounts = 0;
|
||||
|
||||
/* low level interface for porting */
|
||||
extern
|
||||
uint32_t perfc_port_get_system_freq(void);
|
||||
uint32_t perfc_port_get_system_timer_freq(void);
|
||||
extern
|
||||
int64_t perfc_port_get_system_timer_top(void);
|
||||
extern
|
||||
@ -136,7 +135,7 @@ void __perf_os_patch_init(void)
|
||||
|
||||
void update_perf_counter(void)
|
||||
{
|
||||
uint32_t wSystemFrequency = perfc_port_get_system_freq();
|
||||
uint32_t wSystemFrequency = perfc_port_get_system_timer_freq();
|
||||
s_wUSUnit = wSystemFrequency / 1000000ul;
|
||||
s_wMSUnit = wSystemFrequency / 1000ul;
|
||||
|
||||
@ -392,7 +391,6 @@ bool __perfc_is_time_out(int64_t lPeriod, int64_t *plTimestamp, bool bAutoReload
|
||||
uint32_t EventRecorderTimerSetup (void)
|
||||
{
|
||||
/* doing nothing at all */
|
||||
s_lEventRecorderOffset = get_system_ticks();
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -400,14 +398,14 @@ uint32_t EventRecorderTimerSetup (void)
|
||||
/// \return timer frequency in Hz
|
||||
uint32_t EventRecorderTimerGetFreq (void)
|
||||
{
|
||||
return perfc_port_get_system_freq();
|
||||
return perfc_port_get_system_timer_freq();
|
||||
}
|
||||
|
||||
/// Get timer count.
|
||||
/// \return timer count (32-bit)
|
||||
uint32_t EventRecorderTimerGetCount (void)
|
||||
{
|
||||
return get_system_ticks() - s_lEventRecorderOffset;
|
||||
return get_system_ticks();
|
||||
}
|
||||
|
||||
|
||||
|
@ -180,7 +180,7 @@ void perfc_port_init_system_timer(bool bTimerOccupied)
|
||||
}
|
||||
|
||||
__WEAK
|
||||
uint32_t perfc_port_get_system_freq(void)
|
||||
uint32_t perfc_port_get_system_timer_freq(void)
|
||||
{
|
||||
return SystemCoreClock;
|
||||
}
|
||||
|
@ -853,7 +853,7 @@ typedef struct
|
||||
/*============================ PROTOTYPES ====================================*/
|
||||
/* low level interface for porting */
|
||||
extern
|
||||
uint32_t perfc_port_get_system_freq(void);
|
||||
uint32_t perfc_port_get_system_timer_freq(void);
|
||||
extern
|
||||
int64_t perfc_port_get_system_timer_top(void);
|
||||
extern
|
||||
@ -894,7 +894,7 @@ void perfc_port_init_system_timer(bool bIsTimeOccupied)
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t perfc_port_get_system_freq(void)
|
||||
uint32_t perfc_port_get_system_timer_freq(void)
|
||||
{
|
||||
extern uint32_t SystemCoreClock;
|
||||
|
||||
|
@ -46,7 +46,7 @@
|
||||
/*============================ PROTOTYPES ====================================*/
|
||||
/* low level interface for porting */
|
||||
extern
|
||||
uint32_t perfc_port_get_system_freq(void);
|
||||
uint32_t perfc_port_get_system_timer_freq(void);
|
||||
extern
|
||||
int64_t perfc_port_get_system_timer_top(void);
|
||||
extern
|
||||
@ -83,7 +83,7 @@ void perfc_port_init_system_timer(bool bIsTimeOccupied)
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t perfc_port_get_system_freq(void)
|
||||
uint32_t perfc_port_get_system_timer_freq(void)
|
||||
{
|
||||
/* return the system timer frequency */
|
||||
return 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user