Inspector Ronan Kennelly said the defendant was found with the two wraps of brown heroin powder in his possession.
Brian O’Sullivan, aged 29, also had six previous convictions for having drugs for his own use.
More significantly, he had two previous convictions for having drugs for the purpose of selling or supplying to others.
Gardaí Liam Lynch and Des Cogan were on patrol at Eglinton St, Cork City, when they spotted the accused and another man a bus stop.
The gardaí were of the view that the two men were acting suspiciously so a drugs search was conducted. O’Sullivan was found to have the two heroin deals in his trousers pocket.
O’Sullivan, of 14 Estuary Drive, Mahon, Cork, pleaded guilty to the charge of having the drug.
Diane Hallahan, defence solicitor, acknowledged the previous convictions but said they dated back several years.
She said the offence before the court yesterday also dated back to 2014 through no fault of the accused.
Ms Hallahan said in relation to the time of the offence — November 21, 2014 — that the defendant’s addiction had spiralled out of control at that time.
Judge Olann Kelleher said it was a very serious matter to plead guilty to a drugs offence with a list of previous convictions for possessing drugs and having them for sale or supply in the past.
However, the judge said that he would impose a six-month jail term but suspend it.
Judge Kelleher warned the accused, “If you come before the court in the next two years, you will do the six months.”