Creating timing for movement

hi,

what I am after is to make the object(hero) move to any direction randomly for 3000 millisecond and pause/delay for 2000 milliseconds and move again…
// move any direction for 3000 ms
//delay for 2000 ms
//now move any other direction again…and so on…then I wiil use a hittest to create my simple game…but I can not figure out how to create start and pause functions…to get timing…
any help ?
thanks