+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.
#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.
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
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
}
void IconDatabase::syncDatabase()
{
#ifndef NDEBUG
- CFTimeInterval start = CFAbsoluteTimeGetCurrent();
+ double timestamp = currentTime();
#endif
// First we'll do the pending additions
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
}