Reviewed by Tim Hatcher
authorbeidson <beidson@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 25 Aug 2006 21:28:33 +0000 (21:28 +0000)
committerbeidson <beidson@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 25 Aug 2006 21:28:33 +0000 (21:28 +0000)
        Changed some debugging-only code to be more platform independent

        * WebCore.xcodeproj/project.pbxproj:
        * loader/icon/IconDatabase.cpp:
        (WebCore::IconDatabase::pruneUnretainedIconsOnStartup):
        (WebCore::IconDatabase::syncDatabase):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@16040 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/loader/icon/IconDatabase.cpp

index 03cf7b1a06e3c269d06eb3905c04dc68a5a39c2b..338e60c62545b06e3b94cc541483bdaa81b23f68 100644 (file)
@@ -1,3 +1,14 @@
+2006-08-25  Brady Eidson  <beidson@apple.com>
+
+        Reviewed by Tim Hatcher
+
+        Changed some debugging-only code to be more platform independent
+
+        * WebCore.xcodeproj/project.pbxproj:
+        * loader/icon/IconDatabase.cpp:
+        (WebCore::IconDatabase::pruneUnretainedIconsOnStartup):
+        (WebCore::IconDatabase::syncDatabase):
+
 2006-08-25  Nikolas Zimmermann  <zimmermann@kde.org>
 
         Reviewed/landed by Adam.
index 71fc36992ca8838ad38c5372843d0c66027dfd35..f46b836e67881990b10cf72b34d1efa3ebbfd483 100644 (file)
 #include "Image.h"
 #include "Logging.h"
 #include "PlatformString.h"
-#include <errno.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <time.h>
 #include "SQLStatement.h"
 #include "SQLTransaction.h"
-
+#include "SystemTime.h"
 
 // FIXME - One optimization to be made when this is no longer in flux is to make query construction smarter - that is queries that are created from
 // multiple strings and numbers should be handled differently than with String + String + String + etc.
@@ -646,7 +642,7 @@ void IconDatabase::pruneUnretainedIconsOnStartup(Timer<IconDatabase>*)
     ASSERT(!m_initialPruningComplete);
 
 #ifndef NDEBUG
-    CFTimeInterval start = CFAbsoluteTimeGetCurrent();
+    double timestamp = currentTime();
 #endif
     
     // rdar://4690949 - Need to prune unretained iconURLs here, then prune out all pageURLs that reference
@@ -690,11 +686,11 @@ void IconDatabase::pruneUnretainedIconsOnStartup(Timer<IconDatabase>*)
     m_initialPruningComplete = true;
     
 #ifndef NDEBUG
-    CFTimeInterval duration = CFAbsoluteTimeGetCurrent() - start;
-    if (duration <= 1.0)
-        LOG(IconDatabase, "Pruning unretained icons took %.4f seconds", duration);
+    timestamp = currentTime() - timestamp;
+    if (timestamp <= 1.0)
+        LOG(IconDatabase, "Pruning unretained icons took %.4f seconds", timestamp);
     else
-        LOG(IconDatabase, "Pruning unretained icons took %.4f seconds - this is much too long!", duration);
+        LOG(IconDatabase, "Pruning unretained icons took %.4f seconds - this is much too long!", timestamp);
 #endif
 }
 
@@ -706,7 +702,7 @@ void IconDatabase::updateDatabase(Timer<IconDatabase>*)
 void IconDatabase::syncDatabase()
 {
 #ifndef NDEBUG
-    CFTimeInterval start = CFAbsoluteTimeGetCurrent();
+    double timestamp = currentTime();
 #endif
 
     // First we'll do the pending additions
@@ -751,11 +747,11 @@ void IconDatabase::syncDatabase()
     m_updateTimer.stop();
     
 #ifndef NDEBUG
-    CFTimeInterval duration = CFAbsoluteTimeGetCurrent() - start;
-    if (duration <= 1.0)
-        LOG(IconDatabase, "Updating the database took %.4f seconds", duration);
+    timestamp = currentTime() - timestamp;
+    if (timestamp <= 1.0)
+        LOG(IconDatabase, "Updating the database took %.4f seconds", timestamp);
     else 
-        LOG(IconDatabase, "Updating the database took %.4f seconds - this is much too long!", duration);
+        LOG(IconDatabase, "Updating the database took %.4f seconds - this is much too long!", timestamp);
 #endif
 }