Close
Showing results 1 to 3 of 3
  1. #1

    Default Changing the windows multimedia timers

    So how many are changing the windows multimedia timers before starting wow to improve load times (and sometimes fps/latency too)

    I was digging around a bit to get my computer to load faster and stumbled on a thread about how Windows Media player was decreasing the time it took to load a zone. So I dug around a bit more and it turns out that WoW uses the standard Windows Multimedia timers (located in winmm.dll) wrote a little program that change it to 1ms instead of 10ms.
    This vastly improved the zoning time of my main that runs a heavy (50 MiB) interface, went from 54s to 24ish seconds and other characters started to show up imidiatly after zoning in instead of just popping up a few at the time 5-15 seconds after logging in to a major city.

    /edit Okay got time to write the post longer now, so heres the full deal about the multimedia timers as I understand it.

    Windows Multimedia Timers runs at 10ms because ages ago when it was created someone at microsoft did a few calculations and found out if it ran at 1ms the CPU would use 3ish% more power, so it was decided that it should run at 10ms intervals as default.

    World of Warcraft utilize the multimedia timer for loading 3d data, which means it works in 10ms slices. Every single wait and sleep that uses that timer in WoW is rounded up to the closest 10ms.

    What changing this timer will do is all things that uses the timer that isn't dividable with 10ms. Is efficitively speed up by up to as much as 9ms.

    The place where this is most noticable for the game is the zone and character model loading as it loads something, then the next ect. but having this limited to 10ms means that if it gets done before the 10ms is up it will still use that entire timeslice it is alloted via the timer.
    Now if the slice is only 1ms it will have a lot less time wasted idle and able to load the next object much faster, speeding up most loading on the system.

    Like mentioned earlier this was discovered by someone who had WMP running who noticed WoW running much faster than usual. This is not an entirely new discovery. Back some years ago, it was discovered that in conjunction with Half-life dedicated servers. Where having Windows Media Player running would give the server more fps.

    Windows Media Player goes in and sets the timer to 1ms when it starts and puts it back to 10ms when you close it.

    /edit again now with coding goodness

    Code for the program in C.
    Props for this one goes to Planet Half-Life
    Code:
    #include <stdio.h>
    #include <windows.h>
    
    int main(void)
    {
    timeBeginPeriod(1);
    printf("Press any key to restore normal timer frequency.\n");
    getchar();
    timeEndPeriod(1);
    return 0;
    }

    You can find the program on fileplanet at: http://www.fileplanet.com/174303/dow...L-Server-Guide

    Or for C# which I wrote my program in:
    Code:
    [DllImport("winmm.dll", EntryPoint = "timeBeginPeriod")]
    public static extern uint MM_BeginPeriod(uint uMilliseconds);
    
    [DllImport("winmm.dll", EntryPoint = "timeEndPeriod")]
    public static extern uint MM_EndPeriod(uint uMilliseconds);
    and then in the main call
    Code:
    MM_BeginPeriod(1);
    This needs to be called to put the timer back to default
    Code:
    MM_EndPeriod(1);

    You can find the program I use for it and source code for it here (Warning: Because I'm lazy and was just messing about with it in a WPF class, you will need Visual Studio 2008 to actually compile it, and the code it self is a bit of a mess as I was just testing it, (not even layered, OH NOES!))
    http://rl.zxr.dk/codestuff/multimediatimer.rar


    NOTE: This will NOT work for everyone, but the probability that it will help you is high especially if you are running Windows XP
    Werimijn, Worimijn, Wurimijn, Warimijn, Wirimijn - 5 Shaman team - Horde - Draenor[EU]
    Status: Level 18, Hiatus.

    Ilemijn, Ilomijn, Ilumijn, Ilamijn, Ilimijn - A priest and 4 hunters - Horde - Dreanor[EU]
    Status: Level 11, Enjoying the barrens a bit more, EVIL aggro range on red stuff in RFC.

  2. #2

    Default

    I must be missing something because I can't see how this would work with WoW running in its own process memory. Unless
    timeBeginPeriod makes a change to the registry or something like that so when a new process is created it loads this value from it?

  3. #3

    Default

    The function used by this program (timeBeginPeriod) adjusts something that is global to the system, not something that is limited to any single process.

    To be more specific, this setting changes the intervals at which Windows checks to see whether any timers need to be serviced. As this number becomes smaller, Windows checks at shorter intervals and it can therefore service individual appication timers at smaller intervals.

    This program changes this setting temporarily while the program runs. It doesn't change the default value like a registry setting would. If you want to use this program to change WoW's behavior, you need to keep the program running while you play. As soon as you exit this program, Windows will drop back to its slower default setting -- unless some other program is running that has also requested a higher-resolution timing.

    By the way, if more than one program uses this function at the same time, Windows compares their requests and uses the lowest (highest-resolution) number.

    P.S. Microsoft's documentation for this function is a little sketchy, but it's here if you're curious:

    http://msdn2.microsoft.com/en-us/lib...13(VS.85).aspx
    �Author of HotkeyNet and Mojo

Similar Threads

  1. Replies: 16
    Last Post: 05-21-2009, 04:53 AM
  2. Hotkeynet help (Changing windows when i use a key)
    By vaxxon22 in forum New Multi-Boxers & Support
    Replies: 1
    Last Post: 01-31-2009, 09:03 PM
  3. Replies: 8
    Last Post: 05-27-2008, 03:24 PM
  4. Multibox Totem Timers?
    By aetherg in forum Macros and Addons
    Replies: 3
    Last Post: 03-31-2008, 01:42 PM
  5. [WoW] 3 Boxing - First timers view.
    By The IT Monkey in forum General WoW Discussion
    Replies: 19
    Last Post: 09-20-2007, 02:58 AM

Posting Rules

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •