This was a book that I read probably early-2000s as a middle schooler. The main protagonist is a boy who lives in a city separate from the normal flow of time. The city was the headquarters of what was essentially the universe's time police. The boy may or may not have been a minor member of the organization, but uses a time travel device to go find a girl that he believes is prophesied to stop the impending end of time (by collapsing into one I think) but nobody else does.
I am going to suggest that this is A Tale of Time City by Diana Wynne Jones, first published in 1987.
As in the question, the book is set in a place outside the normal flow of time. The cover blurb describes the place as "Time City -- built far in the future on a patch of space outside time -- holds the formidable task of overseeing history". The protagonists of the story are two boys, Jonathan and Sam, who go into the past to kidnap a girl, Vivienne Smith, from September 1939 as she was being evacuated from London at the beginning of World War II. Time City is beginning to decay, and they believe that this girl holds the key to solving the problem of the City's degeneration.
The plot becomes increasingly complicated after this, and the boys have to go on a quest to find four special caskets that have been distributed around history. An extremely detailed summary is available at wikipedia.