Calculating durations should use a monotonic clock instead of system_clock
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
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.
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)
- Dominant language
- C++
- Stars
- 34
- Forks
- 25
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
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.
More from Countly/countly-sdk-cpp
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
Countly/countly-sdk-cpp#103 · 3 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
Countly/countly-sdk-cpp#36 · 4 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
Countly/countly-sdk-cpp#35 · 3 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
Countly/countly-sdk-cpp#34 ·
-
No namespaceOpen
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
Countly/countly-sdk-cpp#33 · 1 reaction ·
All issues in Countly/countly-sdk-cpp
Similar issues
-
backlog bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
EchoTools/nevr-runtime#653 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
InfiniTimeOrg/InfiniTime#2492 ·
-
accessibility good first issue hacktoberfest help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
OpenChemistry/avogadrolibs#3184 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Tracktion/tracktion_engine#475 ·
Maintainers usually reply within 1 day