I've seen people complete it in as little as 2 months and I've seen people still not done after 2 years (in my case it was 3 months). In great part it depends on the candidate (how much time you have available to study, help out with classes, etc.). There are 8 exams (20 questions, mostly multiple choice, 75% required), and while they will require some studying, they're not all that bad (to the motivated student).
For me personally, it had been a long, long time since I had given myself a difficult challenge to complete and the satisfaction I received from completing it was well worth the effort. In fact, in many ways I'm more proud of completing my DM then becoming an instructor--the DM was much harder. That having been said, I love being an instructor more than being a DM, but the process of becoming a DM was much more difficult.
One suggestion I would have, before you start the program, is to make sure that you and your instructor are compatible. In my case I interviewed several instructors to find one who I felt had a similar philosophy as mine (with respect to diving, safety, working with students, and how the DM program would be conducted). The relationship between the instructor and Divemaster Candidate is much like a mentor/protégé, so make sure you're working with someone you respect and you like. In my case my instructor was someone who helped me become successful first as a DM and then as an instructor. Today we're teaching partners and he's probably the closest friend I have (and someone with whom I have a ball fun diving).