Check out the limits offered by the online casino. There are several self-imposed limits that you can set, eg. The amount you deposit or the length of your gambling sessions. You can even opt to self-exclude yourself from the online casino if things get bad.