You don't look at the cost per hour as this will vary based on what the machine is doing at the time. You want to look at the total cost of one standard cycle start to finish (probably best to try and compare based on the cycle you'd most often use).
If you have a smart meter you could measure one cycle and base it off that, or if you have the manual it might say in there, for example mine uses (according to the book, have not tested yet, it's only just arrived) for a standard eco/cotton 7kg cycle 1.17 KWh. I don't know if listing this in the manual is just for newer machines. I'm in Germany and we pay approximately 30 cents per KWh so will cost about 35 cents (plus whatever proportion of the standing charge).
The older heat pump/energy class B ones (under the older rating system that goes up to A+++) were using about 2.75 KWh per cycle when I was researching them, so would cost me about 82.5 cents to run a cycle. It looks from a quick google that "the average" tumble dryer costs 4.5 KWh to run but I don't know if that is a condenser without heat pump or a vented one or how old it is - the vented ones are the most inefficient. 4.5 KWh would cost me about €1,35 which is about 4x as much really.
They do take longer than condenser dryers only, but I don't mind about that because it will still be much quicker than line drying, and speed is not my goal so much as reducing the time spent arranging things on and off the line, and reducing residual moisture in the home. It will be a huge bonus if I can fit in more loads in a day but even combining one TD load and one line dried load will be 2 in a day and I can currently dry a max of 2 lines' worth without running into issues.
If you are looking at new models the important things to check for are heat pump, moisture sensors and then just check the energy rating/energy use per load. Energy ratings are in the process of changing to a newer system which can be a bit confusing.
There is a great channel Lord's Electrical on Youtube with a friendly chap who explains all the power usage etc which I found really helpful.