Time-domain discrete-dipole approximation for simulation of temporal response of plasmonic nanoparticles.