|
zBob Beginner
Joined: 21 Feb 2011 Posts: 12
|
Posted: 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? |
|
|
|
chamenas Wizard
Joined: 26 Mar 2008 Posts: 1547
|
Posted: 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.
|
|
|
|
zBob Beginner
Joined: 21 Feb 2011 Posts: 12
|
Posted: Sun Mar 06, 2011 2:54 am |
That is precisely what I'm looking for! That's for the prompt response!
|
|
|
|
chamenas Wizard
Joined: 26 Mar 2008 Posts: 1547
|
Posted: 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
|
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: 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.
|
|
|
|
|
|