KDE/kdelibs
Christian Ehrlicher
Ch.Ehrlicher at gmx.de
Mon Aug 14 21:49:25 CEST 2006
SVN commit 573079 by chehrlic:
because I can't find timeGetTime() anywhere and we've gettimeofday() on win32, I added HAVE_GETTIMEOFDAY here
you need to update kdewin32 to get this compile on win32
CCMAIL: kde-windows at kde.org
M +1 -1 ConfigureChecks.cmake
M +1 -0 config.h.cmake
M +4 -4 kjs/testkjs.cpp
--- trunk/KDE/kdelibs/ConfigureChecks.cmake #573078:573079
@@ -132,8 +132,8 @@
check_function_exists(srandom HAVE_SRANDOM) # config.h
check_function_exists(unlockpt HAVE_UNLOCKPT) # kdecore, kdesu
check_function_exists(_NSGetEnviron HAVE_NSGETENVIRON) # kinit, config.h
+check_function_exists(gettimeofday HAVE_GETTIMEOFDAY) # testkjs
-
check_library_exists(utempter addToUtmp "" HAVE_UTEMPTER) # kdecore (kpty)
check_library_exists(volmgt volmgt_running "" HAVE_VOLMGT) # various
--- trunk/KDE/kdelibs/config.h.cmake #573078:573079
@@ -141,6 +141,7 @@
#cmakedefine HAVE_VSNPRINTF 1
#cmakedefine HAVE__GETPTY 1
#cmakedefine HAVE_NSGETENVIRON 1
+#cmakedefine HAVE_GETTIMEOFDAY 1
#cmakedefine HAVE_S_ISSOCK 1
--- trunk/KDE/kdelibs/kjs/testkjs.cpp #573078:573079
@@ -57,7 +57,7 @@
long getElapsedMS(); // call stop() first
private:
-#if PLATFORM(WIN_OS)
+#ifndef HAVE_GETTIMEOFDAY
DWORD m_startTime;
DWORD m_stopTime;
#else
@@ -69,7 +69,7 @@
void StopWatch::start()
{
-#if PLATFORM(WIN_OS)
+#ifndef HAVE_GETTIMEOFDAY
m_startTime = timeGetTime();
#else
gettimeofday(&m_startTime, 0);
@@ -78,7 +78,7 @@
void StopWatch::stop()
{
-#if PLATFORM(WIN_OS)
+#ifndef HAVE_GETTIMEOFDAY
m_stopTime = timeGetTime();
#else
gettimeofday(&m_stopTime, 0);
@@ -87,7 +87,7 @@
long StopWatch::getElapsedMS()
{
-#if PLATFORM(WIN_OS)
+#ifndef HAVE_GETTIMEOFDAY
return m_stopTime - m_startTime;
#else
timeval elapsedTime;
More information about the Kde-windows
mailing list