In a medium stockpot, heat the olive oil over medium-high heat. When the oil is hot, add the onions and cook for 2 minutes. Stir in the garlic, bay leaves, thyme, and country ham. Add the black-eyed peas, chicken stock, and 1 cup cold water. Bring the liquid up to a boil, partially cover and reduce to a simmer. Simmer the peas for about 25 minutes, uncover and cook an additional 20 to 25 minutes, or until the peas are tender. Season the peas with salt and pepper as needed.