How long should workouts be?

Is it better to work out on two or three cardio machines in intense intervals where most of the time the workout is very intense, for a total of 40 minutes, or on spend an hour on one machine where you are still sweating but not so intense?
Updates
+1 y
I do 5 to ten minutes of weights as well
How long should workouts be?
Post Opinion