Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Factor out time keeping code into its own module: mono_time.c. #981

Merged
merged 2 commits into from Jul 10, 2018

Conversation

iphydf
Copy link
Member

@iphydf iphydf commented Jul 8, 2018

It turns out, unix_time is also monotonic, and is used as such, so I've
renamed the new functions to mono_time_*.

2018-07-08:

00:01 <@irungentoo> the idea used to be that the unix_time() function
  could go backward in time but I think I might have started using it like
  if it could not after I changed it so that it would never go back in time

This change is Reviewable

@iphydf iphydf added this to the v0.2.x milestone Jul 8, 2018
@iphydf iphydf requested a review from zugz July 8, 2018 08:47
@iphydf iphydf force-pushed the unix-time branch 13 times, most recently from b606ed0 to 9477765 Compare July 9, 2018 10:26
@zugz
Copy link

zugz commented Jul 9, 2018 via email

@iphydf
Copy link
Member Author

iphydf commented Jul 9, 2018

%lld isn't supported on windows: https://travis-ci.org/TokTok/c-toxcore/jobs/401360043#L5394

These are not used in a thread-safe way, but it opens the path towards
per-tox-instance time keeping and removal of some unsafe global state.
It turns out, `unix_time` is also monotonic, and is used as such, so I've
renamed the new functions to `mono_time_*`.

2018-07-08:
```
00:01 <@irungentoo> the idea used to be that the unix_time() function
  could go backward in time but I think I might have started using it like
  if it could not after I changed it so that it would never go back in time
```
@zugz
Copy link

zugz commented Jul 10, 2018 via email

@iphydf iphydf merged commit abc17b0 into TokTok:master Jul 10, 2018
@iphydf iphydf deleted the unix-time branch July 10, 2018 15:15
@iphydf iphydf modified the milestones: v0.2.x, v0.2.4 Jul 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants