Consider something like Cold Turkey, the paid version (one-time fee) has an included scheduler if you can't trust yourself to turn it on when you'd need to. If you don't want to pay for it, the free version includes CLI operations, you can make your own scheduler script without too much trouble.
HN has an included time limiter in the options.. but nothing stops you from launching it in incognito so it's only useful as far as you have willpower.