All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines
Public Member Functions | Static Public Member Functions
QGpCoreTools::ApplicationClock Class Reference

Brief description of class still missing. More...

#include <ApplicationClock.h>

List of all members.

Public Member Functions

 ApplicationClock ()

Static Public Member Functions

static quint64 elapsed ()

Detailed Description

Brief description of class still missing.

From experience, clock() does not return a precision better than seconds. This clock returns the number of microseconds since the startup of the application. It is used for instance for Cache management.


Constructor & Destructor Documentation

Initialize the reference time, i.e. the startup time.

  {
    timeval now;
    gettimeofday(&now, 0);
    _reference=now.tv_usec;
    _reference+=now.tv_sec*1000000;
  }

Member Function Documentation

quint64 QGpCoreTools::ApplicationClock::elapsed ( ) [inline, static]

Returns the number of microseconds elapsed since application startup. The maximum life time of the application must not exceed 584492 years.

Referenced by QGpCoreTools::CacheItem::CacheItem(), QGpCoreTools::CacheProcess::CacheProcess(), QGpCoreTools::CacheProcess::predictedTime(), and QGpCoreTools::CacheItem::unlockData().

{return _instance.elapsedInternal();}

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines