3030#include " Image.h"
3131#include " Logging.h"
3232#include " PlatformString.h"
33- #include < errno.h>
34- #include < sys/stat.h>
35- #include < sys/types.h>
36- #include < time.h>
3733#include " SQLStatement.h"
3834#include " SQLTransaction.h"
39-
35+ # include " SystemTime.h "
4036
4137// 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
4238// multiple strings and numbers should be handled differently than with String + String + String + etc.
@@ -646,7 +642,7 @@ void IconDatabase::pruneUnretainedIconsOnStartup(Timer<IconDatabase>*)
646642 ASSERT (!m_initialPruningComplete);
647643
648644#ifndef NDEBUG
649- CFTimeInterval start = CFAbsoluteTimeGetCurrent ();
645+ double timestamp = currentTime ();
650646#endif
651647
652648 // rdar://4690949 - Need to prune unretained iconURLs here, then prune out all pageURLs that reference
@@ -690,11 +686,11 @@ void IconDatabase::pruneUnretainedIconsOnStartup(Timer<IconDatabase>*)
690686 m_initialPruningComplete = true ;
691687
692688#ifndef NDEBUG
693- CFTimeInterval duration = CFAbsoluteTimeGetCurrent () - start ;
694- if (duration <= 1.0 )
695- LOG (IconDatabase, " Pruning unretained icons took %.4f seconds" , duration );
689+ timestamp = currentTime () - timestamp ;
690+ if (timestamp <= 1.0 )
691+ LOG (IconDatabase, " Pruning unretained icons took %.4f seconds" , timestamp );
696692 else
697- LOG (IconDatabase, " Pruning unretained icons took %.4f seconds - this is much too long!" , duration );
693+ LOG (IconDatabase, " Pruning unretained icons took %.4f seconds - this is much too long!" , timestamp );
698694#endif
699695}
700696
@@ -706,7 +702,7 @@ void IconDatabase::updateDatabase(Timer<IconDatabase>*)
706702void IconDatabase::syncDatabase ()
707703{
708704#ifndef NDEBUG
709- CFTimeInterval start = CFAbsoluteTimeGetCurrent ();
705+ double timestamp = currentTime ();
710706#endif
711707
712708 // First we'll do the pending additions
@@ -751,11 +747,11 @@ void IconDatabase::syncDatabase()
751747 m_updateTimer.stop ();
752748
753749#ifndef NDEBUG
754- CFTimeInterval duration = CFAbsoluteTimeGetCurrent () - start ;
755- if (duration <= 1.0 )
756- LOG (IconDatabase, " Updating the database took %.4f seconds" , duration );
750+ timestamp = currentTime () - timestamp ;
751+ if (timestamp <= 1.0 )
752+ LOG (IconDatabase, " Updating the database took %.4f seconds" , timestamp );
757753 else
758- LOG (IconDatabase, " Updating the database took %.4f seconds - this is much too long!" , duration );
754+ LOG (IconDatabase, " Updating the database took %.4f seconds - this is much too long!" , timestamp );
759755#endif
760756}
761757
0 commit comments