Skip to content
This repository has been archived by the owner on Apr 23, 2020. It is now read-only.

Updated Runner to use poll_interval from json config #27

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion NewRelic.Platform.Sdk/Runner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,16 @@ private void InitializeFactoryAgents()

private int GetPollInterval()
{
int pollInterval = 60;
int pollInterval;
if (this.newRelicConfig.PollInterval.HasValue)
{
pollInterval = this.newRelicConfig.PollInterval.Value;
}
else
{
pollInterval = 60;
}

return pollInterval *= 1000; // Convert to milliseconds since that's what system calls expect;
}

Expand Down