Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 fps help
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Nick




PostPosted: 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
Sponsor
Sponsor
Sponsor
sponsor
CodeMonkey2000




PostPosted: Tue Sep 11, 2007 8:42 pm   Post subject: RE:fps help

Time.Elapsed is the best way.
Tony




PostPosted: 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
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Nick




PostPosted: 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
Tony




PostPosted: 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 ?
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Nick




PostPosted: Wed Sep 12, 2007 2:32 pm   Post subject: RE:fps help

none thats the problem
Clayton




PostPosted: 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
Tony




PostPosted: Wed Sep 12, 2007 4:34 pm   Post subject: RE:fps help

Clayton! You gave it away...
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Sponsor
Sponsor
Sponsor
sponsor
Nick




PostPosted: 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
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 9 Posts ]
Jump to:   


Style:  
Search: