mirror of
https://github.com/kerberos-io/openalpr-base.git
synced 2025-10-06 05:06:53 +08:00
Changed Linux timestamp behavior. Explicitly using CLOCK_MONOTONIC_RAW and CLOCK_REALTIME
This commit is contained in:
@@ -102,7 +102,7 @@ namespace alpr
|
||||
|
||||
//-- Detect plates
|
||||
timespec startTime;
|
||||
getTime(&startTime);
|
||||
getTimeMonotonic(&startTime);
|
||||
|
||||
float maxWidth = ((float) w) * (config->maxPlateWidthPercent / 100.0f) * this->scale_factor;
|
||||
float maxHeight = ((float) h) * (config->maxPlateHeightPercent / 100.0f) * this->scale_factor;
|
||||
@@ -118,7 +118,7 @@ namespace alpr
|
||||
if (config->debugTiming)
|
||||
{
|
||||
timespec endTime;
|
||||
getTime(&endTime);
|
||||
getTimeMonotonic(&endTime);
|
||||
cout << "LBP Time: " << diffclock(startTime, endTime) << "ms." << endl;
|
||||
}
|
||||
|
||||
|
@@ -98,7 +98,7 @@ namespace alpr
|
||||
|
||||
//-- Detect plates
|
||||
timespec startTime;
|
||||
getTime(&startTime);
|
||||
getTimeMonotonic(&startTime);
|
||||
|
||||
float maxWidth = ((float) w) * (config->maxPlateWidthPercent / 100.0f) * this->scale_factor;
|
||||
float maxHeight = ((float) h) * (config->maxPlateHeightPercent / 100.0f) * this->scale_factor;
|
||||
@@ -121,7 +121,7 @@ namespace alpr
|
||||
if (config->debugTiming)
|
||||
{
|
||||
timespec endTime;
|
||||
getTime(&endTime);
|
||||
getTimeMonotonic(&endTime);
|
||||
cout << "LBP Time: " << diffclock(startTime, endTime) << "ms." << endl;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user