Because you call it "homework," that leads me to believe it's not that big an assignment. However, if being late on this one assignment is going to cause you to fail...that suggests you've been slacking off all semester. My advice is to hit the books.
If you have friends here that you correspond with through IM, have them be your wardens. Tell them not to talk to you until you come through with your school work. Use Literotica like a reward you give yourself when you're done with your assignment.