public FilterTrace(uint devId, BUSDOG_REQUEST_TYPE type, BUSDOG_REQUEST_PARAMS params_, BUSDOG_TIMESTAMP timestamp, byte[] buffer) { DeviceId = devId; Type = type; Params = params_; Timestamp = timestamp; Buffer = buffer; }
public BUSDOG_TIMESTAMP GetTimestampDelta(FilterTrace prevTrace) { BUSDOG_TIMESTAMP delta = new BUSDOG_TIMESTAMP(); if (prevTrace.Timestamp.Seconds > 0 || prevTrace.Timestamp.USec > 0) { delta.Seconds = Timestamp.Seconds - prevTrace.Timestamp.Seconds; delta.USec = Timestamp.USec - prevTrace.Timestamp.USec; if (delta.USec < 0) { delta.USec = 1000000 + delta.USec; } } return(delta); }
public BUSDOG_TIMESTAMP GetTimestampDelta(FilterTrace prevTrace) { BUSDOG_TIMESTAMP delta = new BUSDOG_TIMESTAMP(); if (prevTrace.Timestamp.Seconds > 0 || prevTrace.Timestamp.USec > 0) { delta.Seconds = Timestamp.Seconds - prevTrace.Timestamp.Seconds; delta.USec = Timestamp.USec - prevTrace.Timestamp.USec; if (delta.USec < 0) delta.USec = 1000000 + delta.USec; } return delta; }