Don't put a timer. Don't force yourself to code for 10-20 hours. These long sprints happen when you get into your groove and don't even think about how much time you spent.
If it's something you don't really want to do, it'll just be torture to force yourself to complete it. If you already have something interesting enough, you will finish it without putting in much thought.
This only works for side projects, you need lot of coffee for work ;)