From dd20f26c8311610f1f1d620477138b07b88e7be9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Wed, 14 Oct 2009 19:17:20 +0200 Subject: [PATCH] Fixed #820 (Borland C++: Compiler errors because of time_t) --- src/cppcheck.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cppcheck.cpp b/src/cppcheck.cpp index 3dd514955..1e6fe18ef 100644 --- a/src/cppcheck.cpp +++ b/src/cppcheck.cpp @@ -38,8 +38,8 @@ #define TIMER_END(str) if(_settings._showtime){clock_t c2 = clock(); std::cout << str << ": " << ((c2 - c1) / 1000) << std::endl;} #else #include -#define TIMER_START() time_t t1; time(&t1); -#define TIMER_END(str) if(_settings._showtime){time_t t2; time(&t2); std::cout << str << ": " << (t2 - t1) << std::endl;} +#define TIMER_START() std::time_t t1; std::time(&t1); +#define TIMER_END(str) if(_settings._showtime){std::time_t t2; std::time(&t2); std::cout << str << ": " << (t2 - t1) << std::endl;} #endif //---------------------------------------------------------------------------