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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
zBob
Beginner


Joined: 21 Feb 2011
Posts: 12

PostPosted: Sun Mar 06, 2011 2:44 am   

timing events
 
I'm trying to figure out how long certain things in my mud take.

The way I'm thinking of doing it is by noting the start time and end in internal format, getting the difference, and displaying the difference in minutes and seconds.

It's common for programming languages to have a way of returning a date and a time in an internal format - a format that makes math on them much easier.
But I'm having trouble finding a function that will convert a time to an internal format.
Is there a function for that in zScript?
Reply with quote
chamenas
Wizard


Joined: 26 Mar 2008
Posts: 1547

PostPosted: Sun Mar 06, 2011 2:51 am   
 
Internal format? You can just grab %secs at whatever the start time is, and then again at the end time and take the difference. %secs returns in milliseconds, so you'll want to convert as appropriate.
_________________
Listen to my Guitar - If you like it, listen to more
Reply with quote
zBob
Beginner


Joined: 21 Feb 2011
Posts: 12

PostPosted: Sun Mar 06, 2011 2:54 am   
 
That is precisely what I'm looking for! That's for the prompt response!
Reply with quote
chamenas
Wizard


Joined: 26 Mar 2008
Posts: 1547

PostPosted: Sun Mar 06, 2011 3:04 am   
 
I think the whole internal format bit was what threw people off in the other thread. If you had simply asked "I'm trying to measure how long it takes for certain things in my MUD" you probably would have gotten that same answer Razz
_________________
Listen to my Guitar - If you like it, listen to more
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Sun Mar 06, 2011 1:34 pm   
 
Yes, sorry, your other thread sounded to me like you already knew how to track the time and were looking for a function to convert it to a readable time.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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