From 41c4785ba67b93d22c78be9610a826816b46ff8b Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Wed, 7 Aug 2002 15:03:52 +0000 Subject: 2002-08-07 Chris Johns * src/coretodset.c: Correct calculation of ticks until next section boundary. It was incorrectly based upon current time not the time that is being set. --- cpukit/score/ChangeLog | 6 ++++++ cpukit/score/src/coretodset.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'cpukit/score') diff --git a/cpukit/score/ChangeLog b/cpukit/score/ChangeLog index 50c7be955c..60ac1bd870 100644 --- a/cpukit/score/ChangeLog +++ b/cpukit/score/ChangeLog @@ -1,3 +1,9 @@ +2002-08-07 Chris Johns + + * src/coretodset.c: Correct calculation of ticks until next section + boundary. It was incorrectly based upon current time not the + time that is being set. + 2002-07-31 Ralf Corsepius * src/Makefile.am: Build into libscore.a. diff --git a/cpukit/score/src/coretodset.c b/cpukit/score/src/coretodset.c index ddb6f8ee43..9480a6ead9 100644 --- a/cpukit/score/src/coretodset.c +++ b/cpukit/score/src/coretodset.c @@ -50,8 +50,8 @@ void _TOD_Set( seconds_since_epoch - _TOD_Seconds_since_epoch ); ticks_until_next_second = _TOD_Ticks_per_second; - if ( ticks_until_next_second > _TOD_Current.ticks ) - ticks_until_next_second -= _TOD_Current.ticks; + if ( ticks_until_next_second > the_tod->ticks ) + ticks_until_next_second -= the_tod->ticks; _TOD_Current = *the_tod; _TOD_Seconds_since_epoch = seconds_since_epoch; -- cgit v1.2.3