Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Zene
Beginner


Joined: 10 Jul 2002
Posts: 26
Location: Canada

PostPosted: Thu Jul 11, 2002 4:12 pm   

Time counting?
 
This is probably an easy questoin..i tried seraching through the forums...
But is there a way to start counting how long something is happneing...like say on an experience run..at the end i would like ot know how long i've been on it..and then use this for statistics like how much xp per minute and how much gold per minute..etc.

I was looking up to see if #ALARM or the tick timer would help..but i couldn't find any solution with those..i'm guessing there must be a function to do this? but i can't seem to find one..'

Thanks
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Thu Jul 11, 2002 4:45 pm   
 
Try recording the time when you start doing this and the time when you stop. You then substract the latter from the former and you have the time spend on doing it. A convinient way of accomplishing this, is by using the %secs predfined variable which contains the amount of miliseconds since midnight.

Kjata
Reply with quote
Zene
Beginner


Joined: 10 Jul 2002
Posts: 26
Location: Canada

PostPosted: Thu Jul 11, 2002 6:10 pm   
 
havent' tried it yet but it sounds great..
a predefined variable would be used like any other variable?
for example
#var starttime %secs
that sound right?
thanks again
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Thu Jul 11, 2002 8:31 pm   
 
Yes, that's right.

Kjata
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net