Add a random offset to the Xenon initial timer
commitb645b83190211b2aee0c6c9dc1728362a2d8568a
authorEdward Kandrot <ekandrot@fb.com>
Mon, 28 Apr 2014 16:53:31 +0000 (28 09:53 -0700)
committerJoelMarcey <joelm@fb.com>
Fri, 2 May 2014 16:56:04 +0000 (2 09:56 -0700)
treefa5aa7946775c23c28fc6c3478d0e82d8e6a0180
parent8f9bd8c808dd686b13ca25f6b5c0f8d18397cb98
Add a random offset to the Xenon initial timer

Summary: So that when all of the machines reboot at once, we have a random start
time which will translate into smoother logging.
Keep the Period the same, only touch the first timer.
Random number from 1..10000, which keeps it in the range of RAND_MAX as well as
well as gives us a large pool of starting times.

Reviewed By: @markw65

Differential Revision: D1295985
hphp/runtime/base/program-functions.cpp
hphp/runtime/ext/ext_xenon.cpp
hphp/runtime/ext/ext_xenon.h