Delta time using with movment

Hello. im kinda stuck here, so many forums and post and each one is not enought to show how to realy do it so im picking peace by peace.
Here is my main game loop, im trying to calculate float SpeedFactor so i can use it for movment.
This is my basic code. where do i put my stuff to get coresponding SpeedFactor i cant figure it out.

int main(int argc, char* argv[])
{
  float SpeedFactor;
  //Init
  //Load stuff
 while(On)
  {
   
   //Event
   //Actions
   //Render

  }
  //Quit
}

void Actions()
{
  HeroPositionX += HeroMovmentRate * SpeedFactor;
}

From what I can see you need to grab the time difference between each loop and send that through to Actions. I use

Uint32 last = 0, delay = 0;

loop(){
    Uint32 now=SDL_GetTicks();
    if(now > last){
	delay=now - last;
	last=now;
    }
    Actions(delay);
}

void Actions(Uint32 delay) 
{ 
  HeroPositionX += HeroMovmentRate * delay; 
}

Hello,

In addition to the previous answer, I found the following pages related to the subject :

http://gafferongames.com/game-physics/fix-your-timestep/
http://www.koonsolo.com/news/dewitters-gameloop/

Hope this can help. (I’m using fixed frame rate, so I never used this technique).

Clement.

Thank you both figured it out somhow.