From 1c4f99a0c3c845ee52999377a12c80c63495d6a3 Mon Sep 17 00:00:00 2001 From: Richard Cochran Date: Tue, 2 Apr 2013 19:25:29 +0200 Subject: [PATCH] Add a clock method to update the time properties data set. Signed-off-by: Richard Cochran --- clock.c | 5 +++++ clock.h | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/clock.c b/clock.c index 641b882..1f55276 100644 --- a/clock.c +++ b/clock.c @@ -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; diff --git a/clock.h b/clock.h index 7b4bfb0..6fafc08 100644 --- a/clock.h +++ b/clock.h @@ -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.