Closed Bart-Baekelandt closed 2 years ago
In PcapHeader.cs -> public IntPtr MarshalToIntPtr(TimestampResolution resolution)
Contains a unit for resizing the micro- or nansecond value : var unit = resolution == TimestampResolution.Nanosecond ? 1e-9M : 1e-6M;
This results in a zero tv_usec var tv_usec = (ulong)((Timeval.Value % 1) * unit);
Instead the unit should be 1000000000 or 1000000 var unit = resolution == TimestampResolution.Nanosecond ? 1e9M : 1e6M;
slight miscalculation in order :-)
@Bart-Baekelandt could you make a PR?
In PcapHeader.cs -> public IntPtr MarshalToIntPtr(TimestampResolution resolution)
Contains a unit for resizing the micro- or nansecond value : var unit = resolution == TimestampResolution.Nanosecond ? 1e-9M : 1e-6M;
This results in a zero tv_usec var tv_usec = (ulong)((Timeval.Value % 1) * unit);
Instead the unit should be 1000000000 or 1000000 var unit = resolution == TimestampResolution.Nanosecond ? 1e9M : 1e6M;
slight miscalculation in order :-)