It depends on the games you call gambling because let say sport betting for example, you just stake your bet and move on to other things waiting for the outcome but in house games like poker slots and the rest need your active involvement which is where time comes to play, and to stay above that, one need to place some level and form of time check in form of limit, making sure you are not spending too much time on game, also same on the use of money on the casino.
In fact, for betting, you only have to carry the limit of the money you bet. However, for other types of games that require your attention, in addition to setting the limit of money, you also have to consider the time limit. It's not difficult to apply and it's a mental issue.
If you start doing it then it will come simple, a simple habit that allows you to play without harming your family economy.
If you run out of time stop playing (even if you are winning) if you run out of money DO NOT top up and stop playing (even if you run out in 2 minutes).
This way you save your mind and your money.