Skip to content

Make Mono_Time an argument to current_time_monotonic#1100

Merged
iphydf merged 1 commit into
TokTok:masterfrom
zugz:currentTimeMono
Aug 19, 2018
Merged

Make Mono_Time an argument to current_time_monotonic#1100
iphydf merged 1 commit into
TokTok:masterfrom
zugz:currentTimeMono

Conversation

@zugz
Copy link
Copy Markdown

@zugz zugz commented Aug 19, 2018

This change is Reviewable

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Aug 19, 2018

CLA assistant check
All committers have signed the CLA.

@iphydf iphydf added this to the v0.2.x milestone Aug 19, 2018
Copy link
Copy Markdown
Member

@iphydf iphydf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@zugz zugz force-pushed the currentTimeMono branch from 6b4515a to 7d237a6 Compare August 19, 2018 12:49
Copy link
Copy Markdown
Member

@iphydf iphydf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm_strong:

Reviewed 4 of 4 files at r2.
Reviewable status: 1 change requests, 0 of 1 approvals obtained

@zugz zugz force-pushed the currentTimeMono branch from 7d237a6 to 14484c6 Compare August 19, 2018 21:43
@iphydf iphydf merged commit 14484c6 into TokTok:master Aug 19, 2018
@robinlinden robinlinden modified the milestones: v0.2.x, v0.2.7 Aug 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants