Help with a fighting game

i want to make a game thats like king of fighter or street fighter,but i got problem with the running.what i am trying to do is when the player is pressing the left or right arrow,the character walks,and when the player press the key 2 times(with in 1 second or something)it starts running.i got no problem with the pressing the key 2 times and it starts running part,but when i try to set the time,i just have no idea how to do it,any idea?