Tour De France riders can spend 4 hours plus on the bike during stages, So as long as you feel comfortable and you've been cleared by your doctor to exercise you'll be fine. Any time riding at all is beneficial try to aim for 60-70% of your maximum heart rate this is the fat burning zone. To work out your maximum heart rate take your age off 220 then try to work your heart at least 60% of this amount.
If you don't have a heart rate monitor a good guide is to put enough effort in so it is difficult to talk continuously, this will ensure you are getting a good workout.
Personally I'd recommend cycling on a real bike though because it can get a little boring on an exercise bike.
Hope this helps.