mirror of
https://github.com/zebrajr/SamRewritten.git
synced 2025-12-06 00:19:47 +01:00
Fixed minor issue with calculaton of relative times
This commit is contained in:
parent
ba06dfdceb
commit
fceb1a5e1d
|
|
@ -335,6 +335,7 @@ MySteam::setup_timed_modifications(uint64_t seconds, MODIFICATION_SPACING spacin
|
|||
// fetching achievements in CLI mode.
|
||||
|
||||
std::vector<uint64_t> times;
|
||||
std::vector<uint64_t> rel_times;
|
||||
size_t size = m_pending_ach_modifications.size();
|
||||
|
||||
if (size == 0) {
|
||||
|
|
@ -371,12 +372,13 @@ MySteam::setup_timed_modifications(uint64_t seconds, MODIFICATION_SPACING spacin
|
|||
std::sort(times.begin(), times.end());
|
||||
|
||||
// Make relative times
|
||||
rel_times.push_back(times[0]);
|
||||
for (size_t i = 1; i < size; i++)
|
||||
{
|
||||
times[i] = times[i] - times[i - 1];
|
||||
rel_times.push_back(times[i] - times[i - 1]);
|
||||
}
|
||||
|
||||
return times;
|
||||
return rel_times;
|
||||
}
|
||||
// => commit_timed_modifications
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user