Hi Jimoh,
I truly believe, that it depends on how much you really love the current task. I get mentally tired quickly (~2 h), when I need to implement a yet another "contact form", but I can get carried away and can easily work 12 h non stop on my hobby projects or other interesting opportunities. Regular breaks are mandatory though - for me it is a cigarette.