Skip to content

Commit

Permalink
libccp: provide since_usecs callback
Browse files Browse the repository at this point in the history
  • Loading branch information
akshayknarayan committed Jan 13, 2018
1 parent b3eb5db commit 2de1850
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion libccp
Submodule libccp updated from e40be9 to 90847f
5 changes: 5 additions & 0 deletions tcp_ccp.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ static u32 ccp_now(void) {
return tcp_jiffies32;
}

static u32 ccp_since(u32 then) {
return jiffies_to_usecs(tcp_jiffies32 - then);
}

static u32 ccp_after(u32 us) {
return tcp_jiffies32 + usecs_to_jiffies(us);
}
Expand Down Expand Up @@ -298,6 +302,7 @@ static int __init tcp_ccp_register(void) {
.set_rate_rel = &do_set_rate_rel,
.send_msg = &nl_sendmsg,
.now = &ccp_now,
.since_usecs = &ccp_since,
.after_usecs = &ccp_after
};

Expand Down

0 comments on commit 2de1850

Please sign in to comment.