A new study suggests that the peak in star formation occurred about 5 billion years ago, just prior to the formation of our own Sun 4.6 billion years ago. The overall stellar birth rate has declined ever since, meaning that the Universe is slowly getting dimmer. Previous estimates had the peak at about 8 billion years ago.
That being said, University of Edinburgh astronomer Alan Heavens (what a perfect name for an astronomer) believes that star formation will continue to happen for quite some time. "The night sky will gradually dim over billions of years," Heavens said. "But new generations of stars will still be formed, from material thrown out by stars when they die, for much longer. The time scale is very uncertain, but it could be thousands of billions of years" before star formation ceases.
Thousands of billions of years is a fairly significant length of time, even by cosmological standards. This is certainly interesting and potentially important as far as the ongoing existence of intelligent life is concerned. However, even if heat death can be put off in the form of Dyson's Eternal Intelligence scenario, the Big Rip will certainly put an end to the Universe as we currently know it. It's speculated that the Universe's rate of acceleration will continue to increase due to a positive cosmological constant -- so much so that eventually galaxies and stars will recede from each other at the speed of light. Even more extreme is the notion that all matter will start to explode out at this rate, resulting in the complete annihilation of all atoms in the Universe.
Now that will be a bad day.