Summary:
`bm_max_secs` has type int32
So when this value is more than 2, expression
```
FLAGS_bm_max_secs *
1000000000;
```
overflows
Test Plan:
I did put a
```
LOG(INFO) << timeBudgetInNs;
```
and observed correct values (before fix they were overflowed)
Reviewed By: antonl@fb.com
Subscribers: njormrod, folly-diffs@
FB internal diff:
D1663247
Signature: t1:
1663247:
1415261814:
c9154ffde183b2a4f5403e534e47e52e8276c61b
static const unsigned int epochs = 1000;
// We establish a total time budget as we don't want a measurement
// to take too long. This will curtail the number of actual epochs.
- const uint64_t timeBudgetInNs = FLAGS_bm_max_secs * 1000000000;
+ const uint64_t timeBudgetInNs = FLAGS_bm_max_secs * 1000000000ULL;
timespec global;
CHECK_EQ(0, clock_gettime(CLOCK_REALTIME, &global));