You can be online in the app without taking a break for 16 hours. After that, you will stop receiving orders for 5 hours. The 5-hour offline time is for you to take sufficient rest before driving again.
To see your driving time details, open Settings from the app and click on Driving time.
Please note that the online timer only counts time spent on active orders. The time you spend waiting for a ride is not included in the online time.