Preheat your oven to 375°F (190°C).
Grease a baking dish with butter.
Slice the potatoes thinly and set aside.
In a bowl, mix the heavy cream, garlic, salt, pepper, and thyme.
Layer half the potato slices in the baking dish.
Pour half of the cream mixture over the first layer.
Sprinkle half of the grated cheese on top.
Repeat the layers with the remaining potatoes, cream, and cheese.
Cover the dish with aluminum foil and bake for 30 minutes.
Remove the foil and bake for an additional 30 minutes, or until golden brown.