There isn’t a simple “one size fits all” answer to this question. It depends on your course content, how engaging the course is, who it is aimed at and many other variables.
Our experience, and a lot of research, suggests that best practice is elearning courses that are around 10-15 minutes long. Any course over 20 minutes should be broken up into shorter sections.
People find it difficult to remain engaged for more that 10 minutes, especially where there is not much interaction, and it is difficult for most people to find more than 10 or 15 minutes where they are not interrupted with other priorities.
To get the best chance of effectively transferring knowledge through an elearning course, keep it simple, short and sharp.