On DragonVale Breeding Guide, the breeding times affects the type of dragon that will be produced. Say, how would I keep the dragons breeding for 32 hours? Or 24 hours? And how does time affect it?!
You've got it backwards.
What type of dragon that winds up getting bred determines how long the two parents will be at it.
The only way to even slightly influence the outcome is by obtaining the Epic Breeding Island, which has a higher chance of breeding rare dragons according to its wiki entry.
See the Dragonvale Breeding Wikia page for more details than rightfully fit in this answer, and use the Breeding Sandbox to puzzle out how to maximize your chances to get the dragon you want.
ETA: Recently, an update increased the chance of level 15 and 20 dragons to breed rares, but as mentioned in this question people are still trying to determine how much. Statistics are a slow process. :)