A very long time.
Donkey’s years is the more commonly used slang term for ‘a long time,’ but donkey’s ears, although rarely used now, has been an alternative from the early 20th century. Sometimes either phrase is shortened just to ‘donkeys.’
It may be that donkey’s ears was the earlier form and that it originated as rhyming slang, in an allusion to the length of the animal’s ears.
Donkey’s ears works as rhyming slang whereas donkey’s years doesn’t. In rhyming slang the last word of a short phrase is rhymed with the word that gives the slang meaning; for example, trouble and strife – wife, apples and pears – stairs, plates of meat – feet. So ‘donkey’s ears’ would be rhyming slang for ‘years.’
The migration from donkey’s ears to donkey’s years was no doubt aided by the belief that donkeys live a long time. Sometimes they do. And there are a lot more of them around than I knew, according to Wikipedia.
The donkey or ass is a domesticated member of the horse family and has been used as a working animal for at least 5000 years. There are more than 40 million donkeys in the world, mostly in underdeveloped countries, where they are used principally as pack animals.
A male donkey or ass is called a jack, a female a jenny or jennet; a young donkey is a foal. Jack donkeys mate with female horses to produce mules but the result of a mating between a stallion and a jenny is called a hinny. Donkeys can also breed with zebras in which the offspring is called a zonkey (among other names).
As for living a long time, working donkeys in the poorest countries have a life expectancy of 12 to 15 years; in more prosperous countries, they may have a lifespan of 30 to 50 years.
The earliest use of the expression donkey’s ears seems to be 1880. That year, Francis Hindes Groome wrote an account of his travels with the Gipsies, In Gipsy Tents, in which he used the term ‘donkey’s ears.’