Cameron Diaz says ''timing'' is the secret to having a happy relationship.

The 42-year-old actress says for a man and woman to be compatible they both need to want the same thing at the same time otherwise your romance is heading for the rocks.

Cameron told the new US issue of Cosmopolitan magazine: ''You have to find someone in the same place as you are. Timing is everything. If you get into a relationship where you want something the guy doesn't want, it's never going to work. You're never going to get him to be in that place. No matter how old you are, finding the guy who's in the same place as you are and wants to show up is the only way a relationship works, period.''

The 'Sex Tape' star - who refused to confirm or deny she is engaged to current boyfriend Benji Madden in the interview - has previously been in relationships with Justin Timberlake, Matt Dillon and Jared Leto.

And Cameron admits she has learnt one major lesson from all her failed romances - don't keep making the same mistake when picking a man.

She said: ''Here's the thing. You make the same mistake over and over again until you learn your lesson. We girls sometimes do the thing where we pick the same person over and over again - they look and seem different, but deep down, they're the same. And that's on us.''