The ancient Greek philosopher Epicurus is known for claiming that the goal of life is pleasure. The word “epicurean” as commonly used tends to connote a hedonistic indulgence of sensual pleasure, often relating to food. It’s true, Epicurus said that “pleasure is the starting-point and goal of living blessedly,” and that pleasure is “our first innate good.” But what he meant by this is markedly different from ‘pursue every pleasure that you come across,’ especially sensual pleasure. Taking a closer look at Epicurus’s account of living so as to maximize pleasure is a helpful, therapeutic tool in pursuing happiness.
Even during Epicurus’s lifetime, in the 3rd & 4th centuries BCE, his philosophy was taken to be a justification for all kinds of hedonism. But he explicitly states that this is a misunderstanding of his thought.
“So when we say that pleasure is the goal we do not mean the pleasures of the profligate or the pleasures of consumption, as some believe, either from ignorance and disagreement or from deliberate misinterpretation, but rather the lack of pain in the body and disturbance in the soul. For it is not drinking bouts and continuous partying and enjoying boys and women, or consuming fish and the other dainties of an extravagant table, which produce the pleasant life, but sober calculation which searches out the reasons for every choice and avoidance and drives out the opinions which are the source of the greatest turmoil for men’s souls.” 
So according to Epicurus, drinking and partying and sex and ‘dainties’ are not what produce pleasure. Epicurus isn’t a total hater when it comes to these things, but he argues that they can sometimes bring more pain than trouble in the end.
And this is where time comes in. Epicurus says that if the dimension of time weren’t an issue, then all pleasures would be equal.  The feeling of pleasure for Epicurus is really just the absence of pain, and any pleasure is not bad in itself. But the problem is that a lot of these supposed pleasures bring pain in the end. Eating a pint of ice cream is pleasurable at the time (trust me, I’ve done so many times, especially this kind and this kind), but the stomachache afterward is not. And do I even need to give an example when it comes to interpersonal pleasures? If we could encapsulate one moment of pleasure and repeat that over and over again, then all pleasures would be equal, Epicurus says (although wheterh or not he’s right about that is definitely up for grabs!). But because that’s not possible, we need to be prudent about our pleasures, and choose only those that seem to have more advantages than disadvantages. And in order to weigh the advantages and disadvantages, we need to examine possible consequences of pleasures before undertaking them.
And this is how the philosopher of pleasure became the philosopher of prudence. Or, rather, always was such, but people just forgot because they thought that part was boring.
But is living prudently boring? Epicurus sure didn’t think so. He says, “It is impossible to live pleasantly without living prudently, honourably, and justly and impossible to live prudently, honourably, and justly without living pleasantly.” Pleasure and prudence go hand in hand, and we can’t have one without the other. It is only through living prudently, consciously choosing those pleasures that won’t bring equal or greater pain in their wake, that we can begin to live with greater freedom, happiness, virtue, pleasure. Epicurus ultimately wants us to get to a place of not being disturbed by anything (in this respect, his philosophy bears resemblance to Stoicism). Epicurus advocates a kind of healthy life characterized by simple pleasures– we can bet he’d prefer curling up to a good book to a crazy weekend in Vegas.
But the question then becomes: How do we know what pleasures will lead to the diminishing of pain, and which ones will lead to greater pain? In the block quote above, Epicurus counsels that true pleasures lead to “the lack of pain in the body and disturbance in the soul.” It seems that avoiding the first kind of pain is easier– we tend to know pretty well which actions will make us physically hurt, although of course there are exceptions. But what about pleasures that avoid the second kind of pain? Perhaps all we can do is, to the best of our knowledge, reflect on which actions will lead to greater joy and freedom, and which will lead to disturbance, and do our best to act in accordance with the former. 
 Epicurus, trans. Brad Inwood and L.P. Gerson. The Epicurus Reader: Selected Writings and Testimonia. Hackett, 1994, p. 30.
 Ibid., p. 33.
 I think there is certainly an argument to be made that pleasure is a form of disturbance, but it’s not for Epicurus, because for him pleasure is merely the absence of pain and thus is defined more negatively. I don’t entirely agree with this definition– I think that ‘positive’ emotions certainly bring their own kind of disturbances, and I think that pleasure can be such a disturbance. Nonetheless, I think his ideas are useful for teaching us to reflect on actions before undertaking them, with a mind to what will bring about the least amount of pain.