forked from Popn_Tools/popnhax
test enhanced_polling_nb_iter
This commit is contained in:
parent
98ba8de780
commit
d4f47bf9b4
@ -2207,13 +2207,14 @@ int (*usbPadRead)(uint32_t*);
|
|||||||
|
|
||||||
#pragma GCC push_options
|
#pragma GCC push_options
|
||||||
#pragma GCC optimize ("O0")
|
#pragma GCC optimize ("O0")
|
||||||
static void __inline wait_a_little(uint32_t nb_iter)
|
static uint32_t __inline wait_a_little(uint32_t nb_iter)
|
||||||
{
|
{
|
||||||
uint32_t j=0;
|
uint32_t j=0;
|
||||||
for (uint32_t i=0; i<nb_iter; i++)
|
for (uint32_t i=0; i<nb_iter; i++)
|
||||||
{
|
{
|
||||||
j++;
|
j++;
|
||||||
}
|
}
|
||||||
|
return timeGetTime();
|
||||||
}
|
}
|
||||||
#pragma GCC pop_options
|
#pragma GCC pop_options
|
||||||
|
|
||||||
@ -2258,8 +2259,9 @@ static unsigned int __stdcall enhanced_polling_stats_proc(void *ctx)
|
|||||||
curr_poll_time = timeGetTime();
|
curr_poll_time = timeGetTime();
|
||||||
if (curr_poll_time == prev_poll_time)
|
if (curr_poll_time == prev_poll_time)
|
||||||
{
|
{
|
||||||
wait_a_little(config.enhanced_polling_nb_iter);
|
do {
|
||||||
curr_poll_time++;
|
curr_poll_time = wait_a_little(config.enhanced_polling_nb_iter);
|
||||||
|
while (curr_poll_time == prev_poll_time);
|
||||||
}
|
}
|
||||||
prev_poll_time = curr_poll_time;
|
prev_poll_time = curr_poll_time;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user