Effective formalism for open-quantum-system dynamics: Time-coarse-graining approach