Direct-deposit on the pay-period where I make mortgage payments is particularly brutal from the "I'm rich! I'm poor!" standpoint.
With DD, your money-sender "notifies" the receiving bank anywhere from a few hours to an entire business-day before the money is actually going to post to the account. My bank notifies me of my DD as soon as they receive the intent-notice from my employer's payroll processor. That means that I "see" the incoming money even before it's technically available.
That said, my bank treats that money as though it actually has been deposited. That means that I can start writing debits against that credit even before it's technically been credited ...which I generally do.
When it's mortgage-paying time, I log into my loan-servicer's portal and arrange for the payment. Even if I tell them "pay the bill, today," the debit generally doesn't show up in my paying account (the one I receive the pending-DD notification from) till the next day. Still, sometimes the mortgage debit hits before the actual DD credit posts. Thus, some months, there's truly times where there's zero time between the rich/poor events (vice the more-normal "at least I was rich for a few hours!" scenario).