Mice yawn the shortest, about 0.8 seconds on average. Humans, of course, had the longest yawns, averaging 6.5 seconds.

‘The purpose of yawning may be to cool the brain. If an animal has a larger brain, it makes sense that it would take longer to cool it by yawning.’

Importantly, neither the size of the body nor the anatomical structures specific to yawning (cranium and mandible) are driving these effects, because gorillas, camels, horses, lions, walruses, and African elephants all have shorter average yawns than humans. 




Scientists scanned videos of yawning animals, studying 205 yawns from 177 individual animals of different species. Mice yawned the shortest, about 0.8 seconds on average. Humans, of course, had the longest yawns, averaging 6.5 seconds.
Psychologist Andrew Gallup, one of the researchers in the study that the purpose of yawning may be to cool the brain. If you (as an animal) did have a larger brain, it makes sense that it would take longer to cool it (by yawning).
Gallup has some data to prove his idea. He implanted temperature probes in rats brains and showed that yawning does, in fact, seem to cool their brains. Another experiment he performed showed that people who hold something cooling like a cold pack to their heads, are less likely to start yawning (even if others are yawning away).
Source-Medindia