Time Domain Simulation of Signals with Discontinuities