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
hadar
Apprentice


Joined: 30 Aug 2009
Posts: 198
Location: my apt, in california

PostPosted: Wed Feb 10, 2010 4:09 pm   

trigger lag?
 
i have an alarm that fires every second, i was wondering if anyone had an alarm set to this interval and if it lags you even a little, mine seems to slow down commands to the mud by like .5-1.5 seconds, its not alot but enough to annoy me, the trigger is one that is not always running, its used to control winamp, well my gauge to see how much of the song i have left ...
_________________
if you build it they will come, assuming that they have not already come to build it
Aardwolf Bootcamp
My youtube channel
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4774
Location: Pensacola, FL, USA

PostPosted: Wed Feb 10, 2010 4:42 pm   
 
i use several alarms like that without getting bogged down, it depends on exactly what code it is doing
_________________
Discord: Shalimarwildcat
Reply with quote
hadar
Apprentice


Joined: 30 Aug 2009
Posts: 198
Location: my apt, in california

PostPosted: Wed Feb 10, 2010 4:55 pm   
 
Code:
#ADDKEY WinAmpVar SongName @WinAmpCom.CurrentSongTitle
#ADDKEY WinAmpVar SongMin %mod( %db( @WinAmpVar, SongLength)/60,60)
#ADDKEY WinAmpVar SongSec %mod( %db( @WinAmpVar, SongLength),60)
#ADDKEY WinAmpVar SongLength @WinAmpCom.CurrentSongLength
#ADDKEY WinAmpVar SongLengthtest %eval(@WinAmpVar.SongLength*1000)
#ADDKEY WinAmpVar songtime @WinAmpCom.CurrentPos
#ADDKEY WinAmpVar SongNum @WinampCom.PlayListPos
#if (%db( @WinAmpVar, SongSec) <= 9) {#ADDKEY WinAmpVar SongSec %concat( 0, %db( @WinAmpVar, SongSec))}
#if (%db( @WinAmpVar, SongNum) != @currentsongnumber) {winrep @winchan}
_________________
if you build it they will come, assuming that they have not already come to build it
Aardwolf Bootcamp
My youtube channel
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Wed Feb 10, 2010 5:39 pm   
 
Alarms are not meant for "precision". Alarms are implemented using Windows event timers. So when the timer expires, a message it placed into the Windows message queue telling CMUD to process the alarm. The time that CMUD gets this message depends upon how much other processing is happening. For example, processing text from the MUD gets priority in CMUD. Other applications running on your computer can also slow down the processing. The point is that the alarm will not be precise.

As far as the alarm slowing down your other commands, it all depends upon what you do in the alarm. Looking at your script, you have a *lot* of COM-based calls to your @WinAmpCom variable. Each of these is calling a routine within your WinAmp program via the Windows COM system. So there is potentially a lot of lag there. I'd really suggest streamlining the number of COM calls or not running it every second.
Reply with quote
hadar
Apprentice


Joined: 30 Aug 2009
Posts: 198
Location: my apt, in california

PostPosted: Wed Feb 10, 2010 11:04 pm   
 
thanks for the info zugg
_________________
if you build it they will come, assuming that they have not already come to build it
Aardwolf Bootcamp
My youtube channel
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