AskFor() guarantees that entries will always be added with a monotonically increasing timestamp.
int64_t nNow = GetTimeMicros() - 1000000;
static int64_t nLastTime;
++nLastTime;
nNow = std::max(nNow, nLastTime);
nLastTime = nNow;
This means that there is no need to use a map as event queue. This avoids some overhead. Also limit the maximum size of the structure. (see #4547 for further discussion)