In 2010, we published a method to calculate time correlation functions from simulations very efficiently.
J. Chem. Phys. 133, 154103 (2010); http://dx.doi.org/10.1063/1.3491098
From October 2015, a version of the correlator is available as a fix in the LAMMPS code. For the time being, it is distributed as a part of the USER-MISC. You can read the help info on the following link.
A simplest code for multiple-tau correlator is available here.