Time-dependent Resonant Damping in Coronal Loops