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/src/coretodset.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cpukit/score/src') 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