Improved variance prediction functions
Added macro ENTERING_REAL_TIME_CRITICAL_CODE