Were you planning on eating the cocaine as well?
If so, yes, it will effect duration. Otherwise, no.
Eating will only effect the absorption if a substance is taken orally and needs to be broken down inside your stomach.
When snorting the drugs make their way into your system via your mucosal membrane and stomach contents do not effect this.