dotnet / dotnet/wpf

TextBoxView uses DateTime.Now for time measurements

Open
#1,170 2 comments 2 reactions 1 assignee Claimed by @batzen View on GitHub
Enhancement Requested
Dominant language
C#
Stars
7.7k
Forks
1.3k
Avg merge
1d 11h
Merged PRs (30d)
61

Description

* .NET Core Version: All
* Windows version: 1903
* Does the bug reproduce also in WPF for .NET Framework 4.8?: Yes

**Problem description:**
` TextBoxView` uses `DateTime.Now` inside `FullMeasureTick` to measure a maximum time frame of 200 milliseconds for line measurements.
As `DateTime.Now` is "slow" and inaccurate a `Stopwatch` should be used and the time frame should be expressed as a `TimeSpan` instead of int or uint.
The same `TimeSpan` change should apply to the `_throttleBackgroundTimer`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.