Computer Science Canada

fps help

Author:  Nick [ Tue Sep 11, 2007 7:55 pm ]
Post subject:  fps help

i need a way to detect fps without using Time.Elapsed

can anyone help me out here
if there was an accruate way to detect seconds past in a way where i can reset the varible that would be perfect

Author:  CodeMonkey2000 [ Tue Sep 11, 2007 8:42 pm ]
Post subject:  RE:fps help

Time.Elapsed is the best way.

Author:  Tony [ Tue Sep 11, 2007 9:04 pm ]
Post subject:  Re: fps help

momop @ Tue Sep 11, 2007 7:55 pm wrote:
if there was an accruate way to detect seconds past in a way where i can reset the varible that would be perfect

sure thing
Turing:

var reset : int := 0
var time : int := Time.Elapsed

time := reset

Author:  Nick [ Tue Sep 11, 2007 10:27 pm ]
Post subject:  RE:fps help

but then when i make time = Time.Elapsed again it wont have mattered cause Time.Elapsed detects ttime since the time of the program start up

Author:  Tony [ Tue Sep 11, 2007 11:17 pm ]
Post subject:  RE:fps help

Turing:

var time_1 : int := Time.Elapsed
var time_2 : int := Time.Elapsed

what is the difference between time_1 and time_2, in terms of a value ?

Author:  Nick [ Wed Sep 12, 2007 2:32 pm ]
Post subject:  RE:fps help

none thats the problem

Author:  Clayton [ Wed Sep 12, 2007 3:47 pm ]
Post subject:  RE:fps help

Try this on for size:

Turing:

var t1 := Time.Elapsed
Time.Delay (2000)
put Time.Elapsed - t1

Author:  Tony [ Wed Sep 12, 2007 4:34 pm ]
Post subject:  RE:fps help

Clayton! You gave it away...

Author:  Nick [ Wed Sep 12, 2007 5:58 pm ]
Post subject:  RE:fps help

soz guys maybe i shoulda tried it out but everything u guys said worked and i had it wrong


: