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
wedrifid
Beginner


Joined: 10 Dec 2006
Posts: 15

PostPosted: Tue Jan 09, 2007 6:31 am   

Precise timing
 
#alarm is useful for setting up triggers that will be fired in (say) 10 seconds. I am trying to work out the best way to set up a trigger that will fire in something like 750 milliseconds. Is this possible?

My options are currently:
  • Identify some CMUD feature that I am unaware of.
  • Use the com interface to write my own more accurate timer.
  • Hack a %secs polling loop to manage the timing artificially within the alias. This has the downside of being ugly and complicating the queuing of multiple timed commands.
  • Use #wait. This is tantamount to heresy. It also complicates the queuing of multiple timed commands.
Reply with quote
Guinn
Wizard


Joined: 03 Mar 2001
Posts: 1127
Location: London

PostPosted: Tue Jan 09, 2007 7:12 am   
 
#ALARM should work just fine with 750ms

#say %secs
#alarm test {+0.75} {#say %secs}

Came out to exactly 750ms for me
When down to +0.1 then it was a bit less accurate - around 110ms

But for anything over about half a second it should be spot on
_________________
CMUD Pro, Windows Vista x64
Core2 Q6600, 4GB RAM, GeForce 8800GT
Because you need it for text... ;)
Reply with quote
wedrifid
Beginner


Joined: 10 Dec 2006
Posts: 15

PostPosted: Tue Jan 09, 2007 8:16 am   
 
Thanks, hopefully that is close enough to be roughly as good as timing manually.
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