Attention, dieters: stop counting calories and start watching the clock.

That’s the takeaway from a new study that says what you eat doesn’t matter as much as when you eat it.

Research conducted by Satchin Panda from the Salk Institute for Biological Studies in La Jolla, CA and his colleagues found mice that ate an unrestricted diet for eight hours and fasted for the remaining 16 hours didn’t have higher rates of obesity, diabetes or high cholesterol than mice that ate a healthy diet.

“For millions of years, we humans spent our lives as diurnal species — eating most of our calories only in the daytime and fasting overnight,” Panda said, adding that over the past century, we’ve stayed up later and eaten more at night, leading to excess weight.

“The gist of this study is that the timing and the number of hours you fast impact your weight gain,” he said. “Watch the times of day you eat as opposed to what exactly you eat. You don’t have to be as strict in counting calories.”

But some doctors aren’t convinced, saying that what works in mice doesn’t always translate to humans. Keith Ayoob, associate professor in the department of pediatrics at Albert Einstein College of Medicine, also said telling people they can eat whatever they want — even for a restricted time period — could be dangerous advice.

[ABC News]