Increase DateTicks to 64 bits, fix overflow after year 79455

This commit is contained in:
Jonathan G Rennison
2024-01-08 23:16:54 +00:00
parent bd35b0c47c
commit 16b840d86e
7 changed files with 12 additions and 10 deletions

View File

@@ -284,7 +284,7 @@ void LinkGraphJobGroup::JoinThread()
DateTicks bucket_join_date = 0;
auto flush_bucket = [&]() {
if (!bucket_cost) return;
DEBUG(linkgraph, 2, "LinkGraphJobGroup::ExecuteJobSet: Creating Job Group: jobs: " PRINTF_SIZE ", cost: %u, join after: %d",
DEBUG(linkgraph, 2, "LinkGraphJobGroup::ExecuteJobSet: Creating Job Group: jobs: " PRINTF_SIZE ", cost: %u, join after: " OTTD_PRINTF64,
bucket.size(), bucket_cost, (bucket_join_date - NowDateTicks()).base());
auto group = std::make_shared<LinkGraphJobGroup>(constructor_token(), std::move(bucket));
group->SpawnThread();