On the other ... the End of Time on Earth is quite probably far less than 5 billion years in the future, and quite possibly only a few hundred millions. Given the regeneration time of fossil fuels (tens to hundreds of millions of years, and possibly not even then if, e.g., the lignan hypothesis of coal formation is correct), time to evolve a future technological civilisation might not exist.
That's still excluding recovery of other mineral wealth, e.g., iron, copper, and other resources, many of which do date back billions of years (e.g., BIFs, banded iron formations, which date to the Great Oxygenation Event or subsequent eras, 1--3 billion years ago. Fortunately, iron is abundant, but rich ores are useful. The scarcity of other metals, particularly high-efficiency conductors (copper, silver, gold), and low-prevalence alloying elements (e.g., tin) could be far more problematic.