In a case of need, such as one hurrying to a Torah class, one may be lenient to eat dairy after five and a half hours. As the Rambam wrote, one should not eat milk after meat until there is between them about six hours. As the Chida wrote, one need not wait exactly six hours.