I learned once in a NA meeting (narcotics anonymous, since you're not from around here, is a group of people trying to get clean) that if you feel a craving you can make it go away by distracting yourself for only 30 minutes. Apparently that's how long it takes the brain to be fully taken off topic. Meaning, as long as your not actually sick, you can make a craving go away by getting up and doing something else. I know this can be hard to do when motivation is low, but do low stress activities at first like video games, walking, or cooking.
I can personally say that this does work.