Deep inside a medieval watchtower, Markus Marti presides over the passage of time.

Several times a week in the heart of Bern, Switzerland, the retired engineer leads a small group of visitors up a twisting narrow staircase. Then, using a wooden baton as a pointer, he explains how a maze of iron parts powered by a swinging pendulum has, second by second, counted off the last half millennium.

Marti has maintained the machine for nearly 40 years. That morning, it clicked with authority – a hypnotising sound like a heartbeat – inside a thick-walled stone room far removed from the city below.

Time itself, one feels, might live here.

The clock, known as the Zytglogge, doesn’t just count the seconds. It also powers an hourly performance incorporating a dancing jester, parading bears and a gilded figure named Chronos who flips an hourglass and opens his mouth with each strike of the bell.

An oversized cuckoo clock? Maybe. But don’t underestimate its influence. The tower inspired a young patent clerk named Albert Einstein, and changed the way we think about the universe.

Today, the landmark anchors a capital city recognised by Unesco for its intact medieval core. On sunny afternoons, crowds fill the square below to watch the show, tourists gathering as the minute hand approaches the XII at the top of the clock’s massive face. On rainy winter nights, the scene may unfold for just a few stray cats. But even when no one watches, time marches on inside the tower.

Speaking with a quiet German accent, Marti patiently decoded the elaborate clockwork, which is about the size of a walk-in closet. But it was hard to hear him over the machine’s steady tick and spinning gears.

Marti has a delightful job title, which roughly translates as the Governor of Time, although his responsibilities are quite serious. Every day he or one of his two assistants must wind the clock, a full-body effort that pulls a set of stone weights to the top of the 179ft (54.5m) tower. As the load slowly descends, it powers the timepiece, which rings every 15 minutes. Bern residents pace their lives to the sound.

Einstein heard the toll one evening in May 1905. He had been confounded by a scientific paradox for a decade, and when he gazed up at the tower he suddenly imagined an unimaginable scene. What, he wondered, would happen if a streetcar raced away from the tower at the speed of light?

If he was sitting in the streetcar, he realised, his watch would still be ticking. But looking back at the tower, the clock – and time – would seem to have stopped. It was a break-through moment. Six weeks later, he finished a paper outlining a “special theory of relativity”. Later he would show how space-time, as he called it, affected mass, energy and gravity, foreshadowing the nuclear age, space travel, and our understanding of how stars and celestial bodies interact.

I had spent a previous afternoon at a museum devoted to the physicist, gamely sitting through a video explanation of his theories that, the curators promised, even moderately attentive school children could grasp. The cartoon starred a jovial Einstein, but the presentation soon filled my head with a fog that took me back to high school physics.

Here in the tower, though, serenaded by a ticking that seemed to grow louder with every pendulum swing, I began to appreciate, if not fully comprehend, what Einstein was getting at.

Time, I could see, is relative.

Spend an hour with a lover or laughing with friends, and it will flash by in seconds. Sit in traffic and it may drag on for days. But whether you’re hiking the Alps, contemplating physics or answering emails, the gears inside Bern’s tower slowly turn.

Even Marti, a man of logic and science, said he can fall under the spell of his machine.

''Sometimes when I’m alone I think about time,” he said. 'Why does it move sometimes slowly, sometimes fast?”

As our visit finished up, he inserted a cog and jammed a gear, showing how he can pause the movement for repairs or adjustments. The clockwork halted and tension rose in the suddenly silent room. From this perch and perspective, one could believe that time had stopped.

Marti restarted the machine, pushing the pendulum to recapture the lost seconds. The ticking resumed, and I began to relax. A few minutes later, I returned to Bern’s cobbled streets, blinking in the sun as if awakening from a dream.

Looking up at the clock, I searched for its gilded rooster, which ends each hourly performance by raising its wings and emitting a three-note, bellows-powered crow. For more than 500 years, Bern residents have been told to listen for it and heed its message: time is always marching on, so enjoy the next hour of your life.

Places That Changed the World is a BBC Travel series looking into how a destination has made a significant impact on the entire planet.

If you liked this story, sign up for the weekly bbc.com features newsletter, called “If You Only Read 6 Things This Week”. A handpicked selection of stories from BBC Future, Earth, Culture, Capital, Travel and Autos, delivered to your inbox every Friday.