if it's a domestic Canada inbound connection you could clear customs after you had lunch/dinner. The only thing is if you have checked bags they will be there for some time in coustoms control. But they would be tagged for your final flight this they would know you still are coming for them.
I have have left coustoms before and recleared later for a flight and although they look at you funny for going the writ way it was ok ( I forgot to get my one of my checked bags. )
Also as far as I know it's preclearance so unlike at the border I do not think you have to go back to Canada customs but don't quote me on this.