1 #ifndef STORAGE_FACTORY_STORAGE_ACCOUNT_H
2 #define STORAGE_FACTORY_STORAGE_ACCOUNT_H
10 #include "tbb/concurrent_unordered_map.h"
58 amount{iOther.amount.load()},
64 timeMax{iOther.timeMax.load()} {}
84 static void addTo(std::atomic<double>& iAtomic,
double iToAdd) {
85 double oldValue = iAtomic.load();
86 double newValue = oldValue + iToAdd;
87 while (not iAtomic.compare_exchange_weak(oldValue, newValue)) {
88 newValue = oldValue + iToAdd;
101 std::chrono::time_point<std::chrono::high_resolution_clock>
m_start;
119 typedef tbb::concurrent_unordered_map<int, OperationStats>
StorageStats;
134 #endif // STORAGE_FACTORY_STORAGE_ACCOUNT_H