Skip to content

Commit

Permalink
Add a clock method to update the time properties data set.
Browse files Browse the repository at this point in the history
Signed-off-by: Richard Cochran <[email protected]>
  • Loading branch information
richardcochran committed Apr 2, 2013
1 parent 0367bb5 commit 1c4f99a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -1096,6 +1096,11 @@ struct timePropertiesDS *clock_time_properties(struct clock *c)
return &c->tds;
}

void clock_update_time_properties(struct clock *c, struct timePropertiesDS tds)
{
c->tds = tds;
}

static void handle_state_decision_event(struct clock *c)
{
struct foreign_clock *best = NULL, *fc;
Expand Down
7 changes: 7 additions & 0 deletions clock.h
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,13 @@ void clock_sync_interval(struct clock *c, int n);
*/
struct timePropertiesDS *clock_time_properties(struct clock *c);

/**
* Update a clock's time properties data set.
* @param c The clock instance.
* @param tds The new time properties data set for the clock.
*/
void clock_update_time_properties(struct clock *c, struct timePropertiesDS tds);

/**
* Obtain a clock's description.
* @param c The clock instance.
Expand Down

0 comments on commit 1c4f99a

Please sign in to comment.