Memory snapshot management via memory inspection pane
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
#include <mutex>
|
||||
#include <QDateTime>
|
||||
#include <QDate>
|
||||
|
||||
namespace Bloom
|
||||
{
|
||||
@@ -23,6 +24,16 @@ namespace Bloom
|
||||
return QDateTime::currentDateTime();
|
||||
}
|
||||
|
||||
/**
|
||||
* This function calls QDateTime::currentDateTime(). See comment for DateTime::currentDateTime().
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
static QDate currentDate() {
|
||||
const auto lock = std::unique_lock(DateTime::systemClockMutex);
|
||||
return QDateTime::currentDateTime().date();
|
||||
}
|
||||
|
||||
/**
|
||||
* The QDateTime::timeZoneAbbreviation() is a non-static member function but it may still interface with the
|
||||
* system clock. This can result in race conditions when called simultaneously to QDateTime::currentDateTime(),
|
||||
|
||||
Reference in New Issue
Block a user