40 hours could be 16 hours of work followed by 8 hours of sleep and then another 16 hours of work. (I don't know if that's what he actually did.) That's essentially what you do in the last few months of an engineering program, except it's 5-7 days a week, instead of for 2 days.