Efficient numerical method for evaluating normal and anomalous time-domain equilibrium Green's functions in inhomogeneous systems