Title: The Devil's Clockwork - Pullman Philip - book
Summary :
The whole town is eager to discover the new automaton for the great clock. But Karl, the apprentice tasked with creating it, is in despair: he hasn't done anything. Doctor Kalmenius, a genius of clockmaking, arrives to help him. It's the beginning of an abominable night: his creations, as fabulous as they are disturbing, lead to a series of incidents. Could the mechanics of time be dictated by diabolical logic?