lmkd: Fix first poll of an event occuring sooner than intended.

When a new event occurs (could be of same level or different,
doesn't matter) after a event-poll is handled, poll of new event
waits only for "100ms - time since last poll is handled".
But new poll should start after 100ms of last triggered event.
T0: event-1 triggered.
T100: event-1 polled
T120: event-2 triggered.
T200: event-2 polled. (This poll should happen 100ms after T120, i.e., T220)

Bug: 377418039
Change-Id: I10aace061668adfed2594581b94cb9f1e745820b
This commit is contained in:
Divyanand Rangu 2024-11-05 12:04:31 +05:30
parent f32fe4d7d3
commit d155efb41b
1 changed files with 1 additions and 0 deletions

View File

@ -3825,6 +3825,7 @@ static void call_handler(struct event_handler_info* handler_info,
*/
poll_params->poll_start_tm = curr_tm;
poll_params->poll_handler = handler_info;
poll_params->last_poll_tm = curr_tm;
break;
case POLLING_PAUSE:
poll_params->paused_handler = handler_info;