As long as you like really. You can set an electric up to fly twice as long as a nitro machine, but performance will suffer quite a bit as a result.
If you configure a big electric up properly with higher voltage (ala 8 or 10 cell instead of 6) then you can expect around 10 minutes. If you push it close with only 6 cells on a t-rex 600, 5 to 6 minutes is more like it.
Of course, there's nothing stopping you from strapping an 8000 mAh worth of batteries on there and flying for 25 minutes, but it'll fly like garbage with all that weight.