With all the main banks hard cash banked into your bank account is credited immediately the cashier posts the deposit on their computer. It is normally done before you leave the counter, so it is an immediate transfer to your bank account and you can make a direct debit card payment virtually immediately.
You can always telephone your bank or go online to confirm and put your mind at rest BEFORE paying by debit card. Don't do it the other way round - pay an account for a friend on the basis that he will repay you 1 hour later!
One final word, if you do not bank with one of the main clearing banks (Barclays, Natwest, HSBC etc) contact your telephone banking first to confirm.