Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

## Post a reply

Write your message and submit
|
Options

## Topic review (newest first)

bobbym
2011-12-18 08:05:49

The GetTickCount() function if I remember counts in milliseconds from the start of the machine.

So there are 137809 milliseconds, when you divide by 1000 ( there are 1000 milliseconds in a second ) you will get 137 seconds and 809 milliseconds.

model
2011-12-18 08:00:43

Actually , i have moving objects presented in video . i calculated  distance .   I  need to find speed . I am thinking that where should i add statement to get time and use it for speed calculation,. for deciding that i need to understand time meaning w,r,t  code.

Well could you  please tell me that how  are u say : 137809 is 137 seconds and 809 milliseconds.  ?

model
2011-12-18 07:56:54

#### bobbym wrote:

Hi model;

That is not your exact output, what happened to the 123456?

Also 137809 is 137 seconds and 809 milliseconds.

Something is not right but GetTickCount()  is incremental so if two of them are the same that means 0 time occurred between two lines.

ahh hy 123456 is inside cout just  for showing some output .that is not time .

bobbym
2011-12-18 07:50:30

Hi model;

That is not your exact output, what happened to the 123456?

Also 137809 is 137 seconds and 809 milliseconds.

Something is not right but GetTickCount()  is incremental so if two of them are the same that means 0 time occurred between two lines.

model
2011-12-18 06:24:07

#### model wrote:

Hi ,

I get the time of each line of code of my program .

Program :

cout<<" timeBeginPeriod : " << timeBeginPeriod(1) <<endl; //Add Winmm.lib in Project
cout<<" start Time : " << ( (double)GetTickCount() )/1000<<endl;
cout<<" Hi "<< ( (double)GetTickCount() )/1000<<endl;
cout<<" Hi , 123 456 "<< ( (double)GetTickCount() )/1000<<endl;

Note : GetTickCount()  give me number of milisecs . ./

And i get this

timeBeginPeriod : 0
start Time : 137809
Hi 137809
endTimer : 0

Which mean , each line of code taking time  " 137809 " in secs .
My question is What does mean by 137809 . Does it mean its taking that its taking 17 secs  and 809 milisec ?

I think its means 20sec and 809 milisec . Right ?
if  so that mean in c++ each line of code take 20 secs and 809 mili secs .  hmmmm ............

model
2011-12-18 06:16:39

Hi ,

I get the time of each line of code of my program .

Program :

cout<<" timeBeginPeriod : " << timeBeginPeriod(1) <<endl; //Add Winmm.lib in Project
cout<<" start Time : " << ( (double)GetTickCount() )/1000<<endl;
cout<<" Hi "<< ( (double)GetTickCount() )/1000<<endl;
cout<<" Hi , 123 456 "<< ( (double)GetTickCount() )/1000<<endl;

Note : GetTickCount()  give me number of milisecs . ./

And i get this

timeBeginPeriod : 0
start Time : 137809
Hi 137809
endTimer : 0

Which mean , each line of code taking time  " 137809 " in secs .
My question is What does mean by 137809 . Does it mean its taking that its taking 17 secs  and 809 milisec ?

## Board footer

Powered by FluxBB