I use ColdTurkey, you can block any website or program you want on a schedule, or on a timer. You can add breaks, allowances and Pomodoro style setups.
You can remove them whenever you want, but you can add a password I believe, or choose the option to be unable to remove the block while it is active(if you do this, make sure you leave a way to delete it).
I too wanted something like that, must solve an equation or something, but this is close enough.
I too wanted something like that, must solve an equation or something, but this is close enough.