 |
hadar Apprentice
Joined: 30 Aug 2009 Posts: 198 Location: my apt, in california
|
Posted: 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 ...
|
|
|
|
 |
shalimar GURU

Joined: 04 Aug 2002 Posts: 4774 Location: Pensacola, FL, USA
|
Posted: 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 |
|
|
 |
hadar Apprentice
Joined: 30 Aug 2009 Posts: 198 Location: my apt, in california
|
Posted: 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} |
|
|
|
|
 |
Zugg MASTER

Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: 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. |
|
|
|
 |
hadar Apprentice
Joined: 30 Aug 2009 Posts: 198 Location: my apt, in california
|
Posted: Wed Feb 10, 2010 11:04 pm |
thanks for the info zugg
|
|
|
|
 |
|
|
|