Time-domain modeling of metal-dielectric nanostructures