Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#1961 closed defect (fixed)

Timer not fired due to timestamp clock issue in Android

Reported by: nanang Owned by: bennylp
Priority: normal Milestone: release-2.6
Component: pjlib Version: trunk
Keywords: Cc:
Backport to 1.x milestone: Backported: no

Description

Currently PJLIB timer heap uses CLOCK_MONOTONIC for timestamp clock on some platforms including Android, unfortunately it will stop when CPU goes deep sleep, so certain event may not fire at the scheduled time.

Thank you Itay Bianco for the report.

Change History (3)

comment:1 Changed 8 years ago by nanang

  • Resolution set to fixed
  • Status changed from new to closed

In 5447:

Fix #1961: Updated Android timestamp to use CLOCK_BOOTTIME (or ANDROID_ALARM_ELAPSED_REALTIME for older NDK version), to avoid suspended clock when CPU is in deep sleep.

comment:2 Changed 8 years ago by nanang

In 5457:

Re #1961: Updated Android pj_gettimestamp() implementation to use ANDROID_ALARM_ELAPSED_REALTIME.

comment:3 Changed 8 years ago by ming

In 5482:

Re #1961: Fallback to CLOCK_MONOTONIC if /dev/alarm is not found, or getting ANDROID_ALARM_ELAPSED_REALTIME fails.

Note: See TracTickets for help on using tickets.