/* i s C P U t i m e L i m i t E x c e e d e d  */
BooleanType QProblemB_isCPUtimeLimitExceeded(QProblemB *_THIS, const real_t *const cputime, real_t starttime, int nWSR)
/* i s C P U t i m e L i m i t E x c e e d e d  */
BooleanType QProblemB_isCPUtimeLimitExceeded(QProblemB *_THIS, const real_t *const cputime, real_t starttime, int nWSR)
{
	real_t elapsedTime, timePerIteration;
	if ( cputime == 0 )
		return BT_FALSE;
	if ( nWSR <= 0 )
		return BT_FALSE;
	elapsedTime = qpOASES_getCPUtime( ) - starttime;
	timePerIteration = elapsedTime / ((real_t) nWSR);
	if ( ( elapsedTime + timePerIteration*1.25 ) <= ( *cputime ) )
		return BT_FALSE;
	else
		return BT_TRUE;
}