Countly / Countly/countly-sdk-cpp
Calculating durations should use a monotonic clock instead of system_clock
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 34
- Forks
- 25
- PR merge metrics
- No merged PRs in 30d
Description
Durations should not use the system_clock as this can change, resulting in "incorrect" durations (e.g. a user changing the system clock back an hour while an application is running in the background could result in a negative duration).
Instead, durations should be calculated using a monotonic clock (e.g. steady_clock)
However: timestamps need to continue to use system_clock as they need a known epoch time (steady_clock won't provide a known epoch - it ends up as time since the clock started)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No file or test is named. Start by locating duration calculations and distinguishing them from timestamp creation; done means durations use a monotonic clock while timestamps continue using system_clock, with coverage for clock changes if the existing tests support it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- analytics
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100