Transient analysis of non-Markovian models using stochastic state classes