How to compare animation length and NPC speed

Hello there! Im making a TD game where all monsters have different speed. And I want monsters to line up their steps and speed.