One you get to the top of the Burj Khalifa there's no time limit to the amount of time you can spend up there in the Burj Khalifa.
However most people only stay up at the top of the Burj Khalifa for around an hour before they leave because it can get crowded by many other tourists.
The elevator to the top of the Burj Khalifa is only about 1 minute to reach the top but the queue to reach the elevator can be lengthy depending on how many tourists are there.
But once again most people once they reach the top of the Burj Khalifa stay only an hour but you can stay a bit longer if you want too.