Skip to content

Commit

Permalink
- replace max with explicit code
Browse files Browse the repository at this point in the history
  • Loading branch information
sm-msft committed Feb 19, 2025
1 parent f7c4f37 commit 2d01e19
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/perf/lib/PerfServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ PerfServer::Init(
const char* DelayTypeString = nullptr;
DelayType = SYNTHETIC_DELAY_FIXED;
Lambda = ((double)1) / DelayMicroseconds;
MaxFixedDelayUs = max(4 * DelayMicroseconds, 1000);
MaxFixedDelayUs = static_cast<uint32_t>(4 * (uint64_t)DelayMicroseconds);
if (MaxFixedDelayUs < 1000) MaxFixedDelayUs = 1000;

if (TryGetValue(argc, argv, "delayType", &DelayTypeString)) {
#ifndef _KERNEL_MODE
Expand Down

0 comments on commit 2d01e19

Please sign in to comment.