Changeset 217663 in webkit for trunk/Source/JavaScriptCore/runtime/SamplingProfiler.cpp
- Timestamp:
- Jun 1, 2017, 10:42:23 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/runtime/SamplingProfiler.cpp
r216428 r217663 326 326 // http://plv.colorado.edu/papers/mytkowicz-pldi10.pdf 327 327 double randomSignedNumber = (m_weakRandom.get() * 2.0) - 1.0; // A random number between [-1, 1). 328 std::chrono::microseconds randomFluctuation = std::chrono::microseconds(static_cast< uint64_t>(randomSignedNumber * static_cast<double>(m_timingInterval.count()) * 0.20l));328 std::chrono::microseconds randomFluctuation = std::chrono::microseconds(static_cast<int64_t>(randomSignedNumber * static_cast<double>(m_timingInterval.count()) * 0.20l)); 329 329 std::this_thread::sleep_for(m_timingInterval - std::min(m_timingInterval, stackTraceProcessingTime) + randomFluctuation); 330 330 }
Note:
See TracChangeset
for help on using the changeset viewer.