deltachat

Module timesmearing

source
Expand description

§Time smearing.

As e-mails typically only use a second-based-resolution for timestamps, the order of two mails sent within one second is unclear. This is bad e.g. when forwarding some messages from a chat - these messages will appear at the recipient easily out of order.

We work around this issue by not sending out two mails with the same timestamp. For this purpose, in short, we track the last timestamp used in last_smeared_timestamp when another timestamp is needed in the same second, we use last_smeared_timestamp+1 after some moments without messages sent out, last_smeared_timestamp is again in sync with the normal time.

However, we do not do all this for the far future, but at max MAX_SECONDS_TO_LEND_FROM_FUTURE

Structs§

Constants§