From d0acc33834382a2e2ab27bcf7aa541a98107148a Mon Sep 17 00:00:00 2001 From: "dougt%netscape.com" Date: Thu, 8 Mar 2001 00:56:42 +0000 Subject: [PATCH] Fix for 71235. making pagecycler give some timing data. r=waterson@netscape.com --- xpfe/browser/src/nsBrowserInstance.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/xpfe/browser/src/nsBrowserInstance.cpp b/xpfe/browser/src/nsBrowserInstance.cpp index 29117cdc5e2..55db33cb0c3 100644 --- a/xpfe/browser/src/nsBrowserInstance.cpp +++ b/xpfe/browser/src/nsBrowserInstance.cpp @@ -276,7 +276,9 @@ public: nsString data(someData); if (data.Find(mLastRequest) == 0) { char* dataStr = data.ToNewCString(); - printf("########## PageCycler loaded: %s\n", dataStr); + printf("########## PageCycler loaded (%d ms): %s\n", + PR_IntervalToMilliseconds(PR_IntervalNow() - mIntervalTime), + dataStr); nsCRT::free(dataStr); nsAutoString url; @@ -340,6 +342,7 @@ public: const PRUnichar* url = self->mLastRequest.GetUnicode(); printf("########## PageCycler starting: %s\n", NS_ConvertUCS2toUTF8(url).get()); + self->mIntervalTime = PR_IntervalNow(); self->mAppCore->LoadUrl(url); // start new timer @@ -381,7 +384,7 @@ public: } protected: - nsBrowserInstance* mAppCore; + nsBrowserInstance* mAppCore; nsFileSpec mFile; char* mBuffer; char* mCursor; @@ -389,6 +392,7 @@ protected: nsCOMPtr mShutdownTimer; PRUint32 mTimeoutValue; PRUint32 mWaitValue; + PRIntervalTime mIntervalTime; }; NS_IMPL_ADDREF(PageCycler)