The virial theorem involves the time-averages of the potential and kinetic energies if the motion of the system is bounded to a finite region of space.
An ergodic theorem relates the time and space averages of a quantity, in the case of thermodynamics usually the average amount of time spent in some region of phase space with constant energy is proportional to the volume of that region of phase space.
Both principles involve time averages of energy, so I would be surprised if there was no meaningful relationship between them. Someone asked a similar question on Quora, but got no answers.
What is the relationship, if any, between the virial and ergodic theorem?
(Also I apologize for asking two questions in succession -- this and my previous question were both inspired by reading the same chapter of Landau and Lifschitz.)