Timestream doesn't affect caravans properly
When using timestream --units on a low FPS fortress, it seems that caravans stick around for far too long. As in, unloading/reloading their goods takes long enough for the next caravan to arrive. This is not a crippling issue as the game handles the situation of multiple caravans at one depot gracefully.
I wrote the caravan script, and from looking at it again, I'm pretty sure the time_remaining field is what determines when caravans leave. That appears to be in units of days * 120 - so 1 unit per 10 ticks? That may not be possible for timestream to adjust exactly by the same factor as everything else, but it could probably get pretty close.
not sure if it helps, but to give an example: my fort was running with round about 10-15 fps and the caravan left after round about 11 month.
From Quietust on Discord:
Found it: FUN_140acf470 = caravan_state::doTimeout(), called once per tick. It will be important to, while "fast-forwarding" that counter, always make sure that it hits certain values such as 500 (to generate the "Merchants will be leaving soon" message).
From ab9rf:
called from FUN_140ab7000, which is called from a logic method, presumably viewscreen_dwarfmodest based on how long it's taking to decompile
i'd also check to make sure that the cooldowns for the manager and bookkeeper are being adjusted properly as the call to the function that does that is immediately before the one that handles caravan timeouts