mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
beast cleanup and tidying:
* Replace custom types with C++11 <cstdint> types * Fix sqlite integer intos and uses * Fix String implicit integer constructors * Escape the enclosing namespace in sqdb * Replace contract checks with assert * Make many header files compile independently * Remove the dependence on beast_core.h in many places * Remove unused or obsolete classes and functions * Remove unused or obsolete macros * Remove unused network functions and files * Remove unused or obsolete classes: - ChildProcess - HighResolutionTimer - InterProcessLock - Throw - TrackedMutex - UntrackedMutex - XmlDocument - XmlElement
This commit is contained in:
@@ -39,11 +39,11 @@ public:
|
||||
void start () { m_startTime = Time::getHighResolutionTicks (); }
|
||||
double getElapsed ()
|
||||
{
|
||||
int64 const now = Time::getHighResolutionTicks();
|
||||
std::int64_t const now = Time::getHighResolutionTicks();
|
||||
return Time::highResolutionTicksToSeconds (now - m_startTime);
|
||||
}
|
||||
private:
|
||||
int64 m_startTime;
|
||||
std::int64_t m_startTime;
|
||||
};
|
||||
|
||||
static int const callsPerThread = 50000;
|
||||
@@ -57,7 +57,7 @@ public:
|
||||
Random m_random;
|
||||
String m_string;
|
||||
|
||||
Consumer (int id, int64 seedValue, ServiceType& service)
|
||||
Consumer (int id, std::int64_t seedValue, ServiceType& service)
|
||||
: Thread ("C#" + String::fromNumber (id))
|
||||
, m_service (service)
|
||||
, m_random (seedValue)
|
||||
@@ -103,7 +103,7 @@ public:
|
||||
Random m_random;
|
||||
String m_string;
|
||||
|
||||
Producer (int id, int64 seedValue, ServiceType& service)
|
||||
Producer (int id, std::int64_t seedValue, ServiceType& service)
|
||||
: Thread ("P#" + String::fromNumber (id))
|
||||
, m_service (service)
|
||||
, m_random (seedValue)
|
||||
@@ -208,7 +208,7 @@ public:
|
||||
ServiceQueue& m_service;
|
||||
String m_string;
|
||||
|
||||
ServiceThread (int id, int64 seedValue,
|
||||
ServiceThread (int id, std::int64_t seedValue,
|
||||
ServiceQueue& service)
|
||||
: Thread ("#" + String::fromNumber (id))
|
||||
, m_random (seedValue)
|
||||
|
||||
Reference in New Issue
Block a user