Make Mono_Time an argument to current_time_monotonic#1100
Merged
Conversation
iphydf
requested changes
Aug 19, 2018
Member
iphydf
left a comment
There was a problem hiding this comment.
Reviewed 12 of 12 files at r1.
Reviewable status: 0 of 1 approvals obtained (waiting on @zugz)
testing/av_test.c, line 568 at r1 (raw file):
initialize_tox(&bootstrap, &AliceAV, &AliceCC, &BobAV, &BobCC); const Mono_Time *mono_time = (*(Messenger **)bootstrap)->mono_time;
// TODO(iphydf): Don't depend on toxcore internals
toxav/rtp.c, line 511 at r1 (raw file):
return session->mcb(session->m->mono_time, session->cs, new_message(&header, length - RTP_HEADER_SIZE, data + RTP_HEADER_SIZE, length - RTP_HEADER_SIZE));
Maybe move this to the line above.
toxcore/mono_time.c, line 42 at r1 (raw file):
monotime->time = 0; monotime->base_time = ((uint64_t)time(nullptr) - (current_time_monotonic(monotime) / 1000ULL));
Remove the outer set of parentheses.
toxcore/net_crypto.c, line 962 at r1 (raw file):
static int handle_request_packet(const Mono_Time *mono_time, const Logger *log, Packets_Array *send_array, const uint8_t *data, uint16_t length, uint64_t *latest_send_time, uint64_t rtt_time)
Move to line above.
iphydf
approved these changes
Aug 19, 2018
Member
iphydf
left a comment
There was a problem hiding this comment.
Reviewed 4 of 4 files at r2.
Reviewable status: 1 change requests, 0 of 1 approvals obtained
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change is