Transient Simulation of Delay and Switching Effects in Phase-Change Memories