The relationship between duration and intensity for ejective and non-ejective Solar and stellar flares