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;
  //Load stuff


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;

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

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


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

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


Thank you both figured it out somhow.