Nuclear dynamics of decaying states: A time dependent formulation