Systronix_utilities.cpp
//---------------------------< T A S K _ T I M E _ F A S T F W D >--------------------------------------------
//
// Fast Forward task timer so that @is_task_time() will return true on next query
// Do this by forcing elapsed time = interval
// This can be any task timer including the LCD min display timer
// To be overly cautious about this, fast fwd interval - min LCD interval so we don't overrun it...
// ... never fast fwd a negative amount and and at most the interval
// Usually the interval will be much larger than min_task_time or we would not need to fast fwd
// @ TODO make sure this can't be negative or we will wait a VERY long time
//
< T A S K _ T I M E _ F A S T F W D >
Fast Forward task timer so that @is_task_time() will return true on next query
Do this by forcing elapsed time = interval
This can be any task timer including the LCD min display timer
To be overly cautious about this, fast fwd interval - min LCD interval so we don't overrun it
never fast fwd a negative amount and and at most the interval
Usually the interval will be much larger than min_task_time or we would not need to fast fwd
< T A S K _ T I M E _ F A S T F W D > Fast Forward task timer so that @is_task_time () will return true on next query Do this by forcing elapsed time = interval This can be any task timer including the LCD min display timer To be overly cautious about this fast fwd interval - min LCD interval so we don ' t overrun it never fast fwd a negative amount and and at most the interval Usually the interval will be much larger than min_task_time or we would not need to fast fwd
void Systronix_utilities::task_time_fastfwd (e_timer *et_ptr, uint32_t min_task_time)
	{
	uint32_t et = et_ptr->elapsed_time;		
	if (min_task_time > et_ptr->interval)
		{
		min_task_time = et_ptr->interval;
		}
	et_ptr->elapsed_time = (et > min_task_time ? et_ptr->interval : et + (et_ptr->interval - min_task_time));
	}
void Systronix_utilities :: task_time_fastfwd ( e_timer * et_ptr , uint32_t min_task_time ) { uint32_t et = et_ptr -> elapsed_time ; if ( min_task_time > et_ptr -> interval ) { min_task_time = et_ptr -> interval ; } et_ptr -> elapsed_time = ( et > min_task_time ? et_ptr -> interval : et + ( et_ptr -> interval - min_task_time ) ) ; }
< T A S K _ T I M E _ F A S T F W D >
Fast Forward task timer so that @is_task_time() will return true on next query
Do this by forcing elapsed time = interval
This can be any task timer including the LCD min display timer
To be overly cautious about this, fast fwd interval - min LCD interval so we don't overrun it...
... never fast fwd a negative amount and and at most the interval
Usually the interval will be much larger than min_task_time or we would not need to fast fwd
< T A S K _ T I M E _ F A S T F W D > Fast Forward task timer so that @is_task_time () will return true on next query Do this by forcing elapsed time = interval This can be any task timer including the LCD min display timer To be overly cautious about this fast fwd interval - min LCD interval so we don ' t overrun it ... ... never fast fwd a negative amount and and at most the interval Usually the interval will be much larger than min_task_time or we would not need to fast fwd
// get current value in case it increments while we are testing it