mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-15 17:41:45 +00:00
Changing '--rate' option to type float, remove stringstream from argument scan
This correction to the previous commit leaves the <sstream> header in, because std::stringstream has been using already before and the header was missing.
This commit is contained in:
committed by
Mohammad Al-Turany
parent
9b2b1cf9f1
commit
2a134b9206
@@ -520,7 +520,7 @@ void FairMQDevice::RunWrapper()
|
||||
if (fRate > 0.001) {
|
||||
auto timeSinceRef = std::chrono::duration_cast<TimeScale>(std::chrono::system_clock::now() - reftime);
|
||||
auto timespan = timeSinceRef.count() - fLastTime;
|
||||
TimeScale::rep period = (float)TimeScale::period::den / fRate;
|
||||
TimeScale::rep period = static_cast<float>(TimeScale::period::den) / fRate;
|
||||
if (timespan < period) {
|
||||
TimeScale sleepfor(period - timespan);
|
||||
std::this_thread::sleep_for(sleepfor);
|
||||
@@ -909,7 +909,7 @@ void FairMQDevice::SetConfig(FairMQProgOptions& config)
|
||||
fNetworkInterface = config.GetValue<string>("network-interface");
|
||||
fNumIoThreads = config.GetValue<int>("io-threads");
|
||||
fInitializationTimeoutInS = config.GetValue<int>("initialization-timeout");
|
||||
std::stringstream(fConfig->GetValue<string>("rate")) >> fRate;
|
||||
fRate = fConfig->GetValue<float>("rate");
|
||||
}
|
||||
|
||||
void FairMQDevice::LogSocketRates()
|
||||
|
Reference in New Issue
Block a user