Qt (naturally) has a cross platform way of obtaining the time in milliseconds since the epoch, which would remove the dependency on timeGetTime/gettimeofday: http://qt-project.org/doc/qt-5.1/qtcore/qdatetime.html#currentMSecsSinceEpoch