Stephen Cook felt his century in the first Test between South Africa and Sri Lanka owed much to a confidence-boosting hundred against Australia in Adelaide last month.
Cook came under pressure in the recent three-Test series with Australia, after lean returns in Perth and Hobart, but finished the tour on a high by striking 104 in the second innings at Adelaide.
And the opener has built on that innings superbly in Port Elizabeth, scoring 59 and 117 to help South Africa seize control against Sri Lanka.
"Australia was very tough and I spoke about the hardships I had there. Not that it's easier now - because Test cricket is Test cricket - but I was a bit more relaxed in this Test match," said Cook at the end of day three at St George's Park.
"I was coming off a hundred and feeling a bit better about how things are going.
"There are some times when you get criticised but that's the sport that we play. We play in the public arena and if you're going to accept the congratulations on good days, you have to accept the criticism when it doesn't go right.
"Shutting out the noise, that's always the challenge, whether it's noise on the field from the opposition or it's from outside forces. I suppose it takes a bit of a thick skin and I've developed that over the years."
Cook's ton on Wednesday helped the Proteas reach 351-5 in their second innings, giving them a commanding lead of 432 with two days to play.
Asked if there had been discussions over a declaration, he added: "No, we haven't spoke about that as a team.
"I think the fact we scored at 4.4 [runs per over] today has set us up to allow us to declare when we want to, when the time is right. I'm sure overnight the guys will start to have some discussions."