// Register for history on our Thing public void ConsumeHistory() { if (testThing != null) { TheHistoryParameters historyParameters = new TheHistoryParameters { Properties = properties, SamplingWindow = TimeSpan.FromMilliseconds(5000), // Every 5 seconds ReportUnchangedProperties = true, ReportInitialValues = true, Persistent = true, MaintainHistoryStore = false, ComputeAvg = true, ComputeMax = true, ComputeMin = true }; historyToken = testThing.RegisterForUpdateHistory(historyParameters); TheQueuedSenderRegistry.RegisterHealthTimer((l) => { // Every 6 seconds, log the aggregated values. Sampling window for historian is 5 seconds. if (l % 6 == 0) { LogChanges(true); } }); } }