The killer of Lynette White says his quality of life is "vastly better" in jail than when he was free.
Jeffrey Gafoor, 46, was jailed in 2003 for the prostitute's 1988 murder.
Gafoor is now a prosecution witness in the Swansea Crown Court trial in which eight ex-police officers deny conspiracy to pervert the course of justice. Two other people deny perjury.
He hoped he would not always be in jail but was "not in a hurry to get out".
In 2003, Gafoor admitted murdering prostitute Ms White by stabbing her 50 times on 14 February, 1988, after he changed his mind about sex and she refused to give him back £30.
In 2005, he was told he would serve a minimum of 12 years and eight months before being considered for parole.
He told the jury that, "although it might sound bizarre", he was not interested in how long he spend behind bars.
"My quality of life has improved vastly while I have been in prison," he added.
His only complaint was that, "sometimes the intensity of other prisoners can be off-putting".
Gafoor said: "As long as I do all the programmes and get rehabilitated I am not in a hurry to get out.
"If I had to stay there for ever I would make the best of the situation, but I hope that is not the case.
"It can be stressful but, as they say, if you don't want to do the time, don't do the crime."
He agreed, under cross examination, that when he confessed to killing Lynette that the prospect of a life sentence "held no fear for me."
Gafoor told the court that before he was arrested in 2003 he had been a loner, a binge drinker and could hold down only menial jobs. At one stage he had lived in a van.
"I would describe myself as being half-crazy," he added.
Cross examined by Greg Bull QC, the barrister representing retired chief inspector Thomas Page, Gafoor agreed that he had gone against the advice of his own legal team and entered a plea of guilty at the earliest opportunity.
Malcolm Bishop QC, for retired detective sergeant Paul Stephen, asked Gafoor if he had been "paid to keep his mouth shut", which Gafoor denied.
Earlier, Gafoor was accused of lying about how Ms White met her death.
Three men, who became known as the Cardiff Three, were wrongly convicted of the docklands murder.
The prosecution claim that the former South Wales Police officers manufactured evidence that led to the convictions of Ms White's boyfriend and pimp Stephen Miller, Yusef Abdullahi - who has since died - and Tony Paris.
The men were convicted in 1990 of the murder but released from jail two years later by the Court of Appeal.
Mr Bull told the court Gafoor was either lying previously or lying now about how Ms White met her death.
Gafoor, who worked as a security guard, said he could not explain why he had provided different accounts previously but he was now telling the "absolute truth" about what happened.
Mr Bull said Gafoor now said he had taken a hunting knife to the flat in James Street, Cardiff, where Ms White used to entertain clients.
The jury heard that after Gafoor's arrest in 2003, he had told his solicitor that Ms White had produced the knife and he had taken it off her.
He had told the court she had not left the bedroom but he said in 2003 she went into the kitchen.
Gafoor said he had injured himself with his own knife as Ms White struggled during the stabbing, while in 2003 he had said he had received the injuries while taking the knife from her.