Skip to content

Commit

Permalink
Update to fix Period Filter
Browse files Browse the repository at this point in the history
Fixed issue with DataItem Period Filter. It was still comparing based on Unix Milliseconds as opposed to the new Unix Ticks format
  • Loading branch information
PatrickRitchie committed Apr 24, 2023
1 parent 035ff5d commit 6ba1e77
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/MTConnect.NET-Common/Agents/MTConnectAgent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,7 @@ private static bool FilterPeriod(IDataItem dataItem, long newTimestamp, long exi
var period = TimeSpan.FromSeconds(filter.Value);

// Get Duration between newTimestamp and existingTimestamp
var duration = TimeSpan.FromMilliseconds(newTimestamp - existingTimestamp);
var duration = TimeSpan.FromTicks(newTimestamp - existingTimestamp);

return duration > period;
}
Expand Down

0 comments on commit 6ba1e77

Please sign in to comment.