Writing up as you go along is a great idea, but depending on the discipline you may find that you need to rewrite it extensively to work the material into the thesis. This happened to me. My early chapters were fine, but to work them into a large humanities-style thesis/argument I had to totally restructure them. Yes I could reuse a lot of material that I'd written as I went along, but much had to be new, and I couldn't just copy/paste to achieve a good result. I'm actually into my third round of writing now, and expect to hit at least fourth before finishing! On the plus side I started writing very early, so I'm still ahead of schedule. As for how long the writing will take well that will vary too by discipline, and in my case it's taking ages. You also have to factor in enough time to deal adequately with supervisor feedback about thesis chapters. If you're lucky that will require minor changes. If unlucky you could be back to the drawing board again.