In the StatementClientV1 there's the following code checking the timeout:
public bool IsTimeout
{
get => Session.Properties.Timeout.HasValue
&& Session.Properties.Timeout.Value.Ticks > 0
&& stopwatch.ElapsedTicks > Session.Properties.Timeout.Value.Ticks;
}
It is not correct as Stopwatch ticks resolution is based on Stopwatch.Frequency, which is platform dependent. From the doc:
Stopwatch ticks are different from DateTime.Ticks. Each tick in the DateTime.Ticks value represents one 100-nanosecond interval. Each tick in the ElapsedTicks value represents the time interval equal to 1 second divided by the Frequency.
E.g. on M1 Macbook Stopwatch.Frequency is 1_000_000_000 .
In the
StatementClientV1there's the following code checking the timeout:It is not correct as Stopwatch ticks resolution is based on
Stopwatch.Frequency, which is platform dependent. From the doc:Stopwatch ticks are different from DateTime.Ticks. Each tick in the DateTime.Ticks value represents one 100-nanosecond interval. Each tick in the ElapsedTicks value represents the time interval equal to 1 second divided by the Frequency.E.g. on M1 Macbook
Stopwatch.Frequencyis1_000_000_000.