If you are seeking for answer then it shows you are concerned for study. See what, when you ask this to any geek people they all end up by saying they love to study. So this is what you also should do. But you are not geek otherwise you wouldn't be here asking this. So, what you can do is to follow some steps that written below:
Find reasons why to study: As like earning money, knowledge, respect etc. Let me quote “ if you don't study now, you will be working hard in future” either in this time or later you have to work. So why not now therefore you wouldn't need to work hard in future.
Have a daily routine: Without this you can't even last long for 1 hour. But what I am observing now a days is students write on wall a hectic routine but can't able to implement. So make it simple so that you can execute. You don't need to write on wall/paper. Just before sleeping in night or after waking in morning make daily routine in your own mind. That's what I do..
Have a fun gap time in your study: You can't study non stop 12 hours. Even if you can then it won't be helpful. Research shows after every 90 minutes of full concentration mind starts loosing it focus. So give 10 minutes break after each one and half hours.
I believe only above three are more than enough to devote yourself in that big and tough journey of 12 hours study. But let me remind you, you shouldn't be thinking that's a tough journey. Take it easy have fun with study then after you can do it… But don't forget “ Quality matters Quantity not”. So it's ok if someday can't put 12 hours. In that day just study smartly that looks like you have completed your 12 hours challenge. Best wishes…