Knowing little about the subject. If Insulin is a 20 minute lag, and eating is a 20 minute lag. Shouldn't you just dose immediately before eating so they hit at the same time?
It's a very rough rule of thumb, take these numbers with a grain of salt. It could very well be that some food activates in 5 minutes etc. Different insulin types also have different curves.