How does gravity affects time? Expression of relation between time and gravityi
The answer to your question can be very involved, and I'm not sure how mathematical you'd like the answer.
For now, time is dilated (compressed) outside a non-rotating spherical mass according to the relation:
to = tf * sqrt (1 - 2 * G * M / (r * c ^ 2) ) = tf * sqrt ( 1 - rs / r )
• to is the proper time between events A and B for a slow-ticking observer within the gravitational field,
• tf is the coordinate time between events A and B for a fast-ticking observer at an arbitrarily large distance from the massive object (this assumes the fast-ticking observer is using Schwarzschild coordinates, a coordinate system where a clock at infinite distance from the massive sphere would tick at one second per second of coordinate time, while closer clocks would tick at less than that rate),
• G is the gravitational constant,
• M is the mass of the object creating the gravitational field,
• r is the radial coordinate of the observer (which is analogous to the classical distance from the center of the object, but is actually a Schwarzschild coordinate),
• c is the speed of light, and
• rs is the Schwarzschild radius of M.
This is a consequence of General Relativity.
At the Schwarzschild radius of a Black Hole, to = O, or no time passes at all!
But perhaps the best non-mathematical explanation of gravitational time dilation is given by http://www.upscale.utoronto.ca/PVB/Harrison/GenRel/TimeDilation.html
Hope that helps.
Prof. James Gort