void MapReduceProgress::updateTimeElapsed()
{
	QString niceTime = "";
	int ms = m_timeElapsed.elapsed();
	
	niceTime += timeComponent(&ms, 60*60*1000, "hour");
	niceTime += timeComponent(&ms, 60*1000, "minute");
	niceTime += timeComponent(&ms, 1000, "second", true);
	
	m_ui.timeElapsed->setText("Time elapsed: " + niceTime);
}
static QByteArray messageId(const QByteArray& domainName, quint32 addressComponent)
{
    static bool rngInitialised(initialiseRng());
    Q_UNUSED(rngInitialised)

    quint32 randomComponent(static_cast<quint32>(qrand()));
    quint32 timeComponent(QDateTime::currentDateTime().toUTC().toTime_t());

    return ('<' +
            QString::number(randomComponent, 36) + 
            '.' +
            QString::number(timeComponent, 36) +
            '.' +
            QString::number(addressComponent, 36) +
            "-qmf@" +
            domainName +
            '>').toLatin1();
}