I'm pretty sure I've gone more than 90 days clean, BH, of not masturbating.
The trick was having a chevrusa at night till 10:45 and then one in the morning at 6:15.
I also do not have internet access on a laptop and enough gigs on my phone to last me 3 hours if I watch videos. With so little chance to really browse at high speeds and being under such time pressure to go to sleep and work and eat, there has been so little opportunity to sit back and relax. It's so liberating.
I also go to the mikveh if I masturbate or have a wet dream, which definitely helps.
Having other people rely on me to be there, as my chevrusas do, really made it happen.
Plus, they are both on much higher learning levels than I am.
I usually go over the material 10+ times before and after, where they only look at it in the chevrusa and then maybe on Shabbos.