There are various things to do at the top of both the Jungfrau and the Schilthorn, and given the cost of these, you'll want to do everything that interests you before descending.
At the Jungfraujoch, there are several observation areas, places to take your Instragram-ready photos, and my favorite, a section of the glacier you can walk out on. In addition to the views, it's fun to be there with people from all over the world, some of whom have literally never seen snow before - their elation is contagious. I probably spent a few hours total at the top.
At the top of the Schilthorn, the major thing is a large exhibit about the filming of On Her Majesty's Secret Service, the James Bond film made there in 1969 or 1970 (film was released 1970). This was more interesting than I had anticipated; I'm a film buff, but hadn't seen the movie itself. If this doesn't interest you, you won't spend too long at the top, but on the way down, there's a stop at Birg. This was great, because while on the top I had clouds obstructing my views of the three peaks, while at Birg I had crystal-clear views.
Overall, the Schilthorn takes much less time than the Jungfrau; the travel up and down is faster, and you spend less time at the top.
On my Jungfrau day, I left my Mürren hotel at about 8 AM and returned about 3:30 PM, quite tired (don't underestimate the effect of the altitude). So, while you could conceivably do both in one day, I wouldn't recommend it. At those prices, you really want to enjoy the experience, not rush around just to say you did them. And don't go unless the webcams show it's clear, or it's a waste of both time and money.
If you want a shorter and cheaper excursion, go up the Allmendhubel. You get great views of the three peaks, and while it's not as spectacular as the view from Birg or Schithorn, you can walk around the area and see lots of wildflowers (at least I did in September 2014).