'2 seconds' is not the only choice for our case, we may set other values for these two variables. The reason that I set it as '2s' is based on the following consideration,
a) The value should not be too large, we hope the main document could be closed in time if it has been idle for some time.
b) At the same time the value could not be too small. If value is too small, it may cause wrong behavior. For example,  if main_document_idle_time_ is set as 100ms,  main_document_suspending_time_ also 100ms,
0.0s, open a window A;
0.5s, close the window A;
1s, open a new window B.
For this case, window B may be never created, because the main document may closed around at 0.7s.

Based on the above consideration, I set '2 sec' for them.