Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit f05a8c49 authored by Hansong Zhang's avatar Hansong Zhang
Browse files

Add Timer as an alternative to osi alarm

* Add a private method MessageLoopThread.DoInThreadDelayed to post a
  delayed task in message loop, as an alternative approach to osi alarm
  clock
* Add a unit test for MessageLoopThread to check ShutDown() waits until
  current task finishes
* Add Timer using MessageLoopThread.DoInThreadDelayed
* Timer provides similar API as osi alarm, and uses same OS clock (boot
  timer) as alarm
* Add benchmark and unit tests to ensure the performance is comparable
  to the existing osi alarm

Test: Run unit test and benchmark test
      ./test/run_unit_tests.sh bluetooth_test_common
      ./test/run_benchmarks.sh bluetooth_benchmark_timer_performance
      --benchmark_repetitions=10 --benchmark_report_aggregates_only=true
Bug: 110303473
Change-Id: I6f2e7ae2f80f9889fc5fe3c8cd6b9b2670938b46
parent 76250727
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment