Switching, hysteresis and time delay in charge-density-wave conduction