diff --git a/src/tl/tl/tlTimer.cc b/src/tl/tl/tlTimer.cc index 5deaf5869..df3819210 100644 --- a/src/tl/tl/tlTimer.cc +++ b/src/tl/tl/tlTimer.cc @@ -32,6 +32,7 @@ #endif #include +#include #ifndef _MSC_VER // not available on MS VC++ # include @@ -53,7 +54,7 @@ int64_t msecs_to (const QDateTime &from, const QDateTime &to) } // ------------------------------------------------------------- -// Implementation of timer +// Implementation of Timer Timer::Timer () : m_user_ms (0), m_sys_ms (0), m_wall_ms (0), @@ -184,7 +185,7 @@ SelfTimer::report () const } // ------------------------------------------------------------- -// Implementation of timer +// Implementation of Clock Clock::Clock (double s) { diff --git a/src/tl/tl/tlTimer.h b/src/tl/tl/tlTimer.h index 5848c2f61..2bf256b6e 100644 --- a/src/tl/tl/tlTimer.h +++ b/src/tl/tl/tlTimer.h @@ -149,13 +149,19 @@ private: }; /** - * @brief An abstraction of the clock() function found in the POSIX API + * @brief An abstraction for a time measurement feature + * + * This class can be used to take the current time and + * compute time differences. The clock represents real + * time and can be used to time user interface actions. * - * The original clock function returns the number of ticks spent in the - * user process from start of the process. On some platforms this includes - * the child processes' time as well, on others (like Linux) is does not. - * In order to provide a equivalent implementation of this function for - * other platforms, this function is provided in this module. + * @code + * tl::Clock start = tl::Clock::current (); + * ... do something + * if ((tl::Clock::current () - start).second () > 2) { + * ... took longer than 2 seconds + * } + * @/code */ class TL_PUBLIC Clock {