Hello,

While I was trying to add some code to time events such as DNS resolution in
Mozilla,
I found the folowing code (in the file nsDnsService.cpp):

#ifdef DNS_TIMING
    if (getenv("DNS_TIMING")) {
        mOut = fopen("dns-timing.txt", "a");
        if (mOut) {
            PRTime now = PR_Now();
            PRExplodedTime time;
            PR_ExplodeTime(now, PR_LocalTimeParameters, &time);
            char buf[128];
            PR_FormatTimeUSEnglish(buf, sizeof(buf), "%c", &time);
            fprintf(mOut, "############### DNS starting new run: %s\n",
buf);
        }
    }
#endif

At first I was happy, because it seemed to be close to what I needed.
So I set MOZ_DEBUG=1 and DNS_TIMING=1, and I compiled a new Mozilla.

Halas this one crashes at start. Win 2000 Pop's an error message up
saying that some memory address can't be read.

Did I miss some thing ? Is there a list of the things that can be timed
without any modification of the code ?

Thanks!

Reply via email to