There’s something that nearly every manager worries about and no employee can honestly deny doing at least a little bit: not working at work.

According to the American Time Use Survey, U.S. workers spend nearly 9 hours at work each weekday, but even by their own admission, not all that time is spent working. One recent study reported that the average time spent on personal things at the office is anywhere between one-and-a-half to three hours a day. In a survey, employees said that the biggest time-wasters at work were browsing the Internet and socializing with colleagues (and of course, attending meetings).

Different companies and industries probably see a lot of variance in employees’ loafing, but there’s an interesting question to be asked more generally: Is the amount of time spent on non-work activities at the office affected by the health of the overall economy?

Theoretically, when the economy is doing badly, employees would work harder in order to hold onto their jobs. Following that logic, workers are more relaxed when the economy is healthy because there are more jobs out there and employers have to fight to hold onto talented workers. “That is classic economics, goes back to Marx,” explains Dan Hamermesh, the co-author of a new National Bureau of Economic Research working paper on whether effort at work responds to changes in the economy.

“But,” Hamermesh goes on, “empirical and theoretical work in the 1960s showed that labor productivity fell in recessions, opposite the Marxian prediction.” It was a little puzzling until economists came up with a reasonable explanation—that even if there was less work for employees to do during slower times, employers still held onto their staff so that they didn’t bear the costs of searching, hiring, and training new workers when the recession ended. “Thus these two old theories are completely contradictory, a contradiction that motivated our study,” Hamermesh says.

Hamermesh, along with the economists Michael Burda and Katie Genadek, looked at time-use data from 2003 to 2012 in order to see what people did when they weren’t working at work, and how that varied as the state of the economy changed. From the dataset—which includes over 35,000 diaries of daily activities of employed people during weekdays—Hamermesh and his colleagues found that employees self-reported an average workday of eight hours and 20 minutes, with 7 percent of that time spent not working. That 7 percent—about 34 minutes—was mostly spent eating, but also on leisure, exercise, cleaning, and other non-work activities. (Hamermesh notes that this was lower than expected, but it doesn’t include time spent away from the office during the workday, such as taking a walk or getting lunch at a cafe. Plus, it’s self-reported, so the diarists might have been underestimating.) The researchers also found that for most people, increasing the number of hours at work increases the share of time spent not working.

As for how the economy affected these numbers, the researchers looked at  unemployment figures. They found that generally, the number of workers who reported not working at work decreased during bad economic times. But during down times, the workers that did loaf at work did a lot more of it.

“This was sort of a horse-race between rationales implying opposite observations,” says Hamermesh. “The neat result was that the probability of loafing at all does decrease in recessions, as Marx would say, but the amount of loafing done by those who loaf increases; and, indeed, this latter effect dominates on net.” The researchers concluded that this might be the case because while high unemployment increases the pressure not to slack off, those who choose to do so even during a recession—when there’s theoretically less work to be done—are ones who are the most dedicated loafers.