Most of us think of time as a way to measure such things as the length of our days and the span of our lives. But if you had access to a pair of extremely high-precision clocks, you could use time in a different way — to measure the height of mountains.

Scientists have described a major step forward in using time to determine height above sea level. For the first time, they took an optical atomic clock out of the lab. Their liberated device was brought into the French Alps.

By comparing the tick rate of the portable atomic clock on a mountain with a similar clock in a lab in Torino, Italy, the researchers showed that the altitude difference between the two locations was about 1,000 meters, or 3,280 feet. Their work was published in Nature Physics.

“The idea of using portable clocks this way has been in the geophysical literature for a long time,” said Duncan Agnew, a geophysicist at the Scripps Institution of Oceanography in San Diego, who was not involved in the work. “What these guys managed is to actually do it.”

According to Einstein’s theory of relativity, time moves differently depending on where you are in a gravity field.

For example, a clock on top of a tall mountain will move a tiny bit faster than a clock at the base of that mountain, where the gravity is stronger.

It’s not a mechanical error. Time itself actually passes faster at the top of the mountain.

That means that your friend who lives in the Rockies is aging just a tiny bit faster than your friend who lives on the beach in Malibu.

“Your body and your biological experience exist in the real time of whatever place you are in,” said Christian Lisdat, a physicist at Germany’s National Metrology Institute, who worked on the study. “And that is no different than clocks.”

Most clocks aren’t accurate enough to register the difference in the speed of time at different altitudes. After all, in 10 years, two clocks that are 1,000 meters apart from each other in height will be off by just 31 millionths of a second, Agnew said.

But some atomic clocks can break a single second into such tiny parts that they can detect a minuscule shift in the speed of time.

“They call them clocks, but really what they are doing is taking the equivalent of tuning forks up to the top of a mountain and measuring the difference in frequency between the one at the top and the one at the bottom,” Agnew said.

Since 1655, timekeeping has been all about building something that oscillates at a constant rate — be it a pendulum, a spring watch or quartz crystals that vibrate if you pass an electric current through them.

Atomic clocks follow the same principle. They use the quantum jump of electrons as a pendulum.

“These jumps are a very fundamental quality of an atom, and they are the same for every atom of that type,” Lisdat said. “No matter where you find it in the universe, you get the same frequency of the pendulum.”

Some of the most accurate clocks, known as optical lattice clocks, measure the movement of electrons around strontium atoms that have been trapped in a network of lasers. With this setup, an optical lattice clock can measure 9 billion ticks per second.

However, clocks with this level of accuracy usually remain in the lab, where it is easier to maintain a vacuum chamber, cool the strontium atoms to temperatures near absolute zero, create a network of highly focused laser beams and steady hundreds of mirrors — all of which are required for the clock function properly.

Lisdat and his colleagues wanted to build an optical lattice clock that could go on the road. The key was to determine which trade-offs would allow the clocks to leave the lab without losing too much accuracy

“What we did is take something state-of-the-art and make it transportable,” Lisdat said. “It’s not easy.”

Ultimately, the team was able to break the optical lattice clock into pieces that would fit in a temperature-stabilized, vibration-dampened trailer towed by a car.

“It was kind of like a small laboratory you can carry around with you,” Lisdat said.

For its first test run, the authors took their portable clock to a lab in the French Alps. Using an optical fiber link, they connected the clock with another one about 55 miles away in Torino.

“We wanted to have a considerable height difference so the effect would be quite large,” Lisdat said.

The first experiments did not go smoothly: A tunnel was being built nearby, and the drilling compromised the clock’s stability.

In addition, a combination of lower-than-expected humidity and warmer-than-expected temperatures made it harder to keep the clock’s components sufficiently cool.

Still, they were able to tell that the portable clock was about 1,000 meters higher than its counterpart in Torino.

“It didn’t work as nicely as we hoped, but we learned a lot and it’s a start,” Lisdat said. “Sometimes you just have to begin, and then you can figure out how to improve.”

Ultimately, as the accuracy of the portable clock gets better, time could be used to resolve height differences of just one centimeter, the study authors said.