How to make any animation take 1 second to finish inside the animator

Hello guys,
I am trying to make an attack animation last for exactly 1 second I have an animator and I was wondering how I can do that:

For example an attack animation that needs 1.5s to finish the animation, What I want it to do is finish the animation at 1s or an animation that takes 0.2s I want it to run at 1second, I know there is a speed parameter at every state machine but does that mean I should get my calculator and make every attack animation take 1s to finish by adjusting the speed in my case 1.5s needs 0.666666 speed and 0.2s needs 5 speed ( I guess ), Thanks in advance

I haven’t found any thread that gives a clear answer

I think you have it figured out by using your calculator. You could always write a script that does this for you if you have thousands of animations, but otherwise, do it the way you were thinking!

every animation has frames from start to stop, the speed will be different from how many frames each animation has if you want to reach 1 second. You can make a algorithm to adjust the speed according to animation length.