HighPrecisionTimeStamps
No summary available for this package.
Version | Released | Deprecated |
---|---|---|
1.0.0.5-alpha | Oct 1, 2021 | Oct 1, 2021 about 3 years ago |
1.0.0.4 | Sep 19, 2021 | |
1.0.0.2 | Sep 4, 2021 | |
1.0.0.1 | Aug 21, 2021 | |
1.0.0 | Aug 13, 2021 | |
0.1.1-beta | Aug 5, 2021 | |
0.1.0 | Dec 13, 2020 | |
0.0.5.4-beta | Dec 6, 2020 | |
0.0.5.1-beta | Nov 27, 2020 | |
0.0.4-beta | Nov 18, 2020 |
Last updated on 19 January-2024, at 03:05 (UTC).
Got EOL?
Xeol can give you visibility into end-of-life (EOL) and deprecated packages across all your repositories. Try it out!
Description
It is well known that DateTime.Now is often used inappropriately. For example, it may be used together with TimeSpan to produce a task's timeout point or subtracted from another DateTime to calculate a duration. This can cause subtle bugs because DateTime is not monotonic: the system clock can change, making the result of the subtraction inaccurate -- potentially causing a premature timeout or an infinite loop. Yet, DateTime is an incredibly convenient and widely used value type in .NET code and is especially useful when printed in ISO-8601 format (with the "O" format specifier). With the "O" specifier, you can resolution down to tenths of a microsecond, which is nice. Until you learn that the resolution of the system clock is usually more coarse than several *milliseconds*, making the additional decimal places misleading garbage values. For calculating durations (time between events), it is better to use a high-resolution and monotonic clock like that provided by System.Diagnostics.Stopwatch: on most computers it is far more **accurate** than DateTime.Now even though, seemingly paradoxically, on a few systems, its *resolution* is lower than that of DateTime. Also, unsurprisingly, Stopwatch does not provide values that correlate to times of day: while it is appropriate for calculating durations, it is inappropriate for timestamping against a readable date and time. This library provides timestamps (both as DateTime and as analogous value types it defines) that use the Stopwatch (and your system's high peformance event counter) as its clock, but returns values as DateTimes or an analog thereto so that these values can be used for a mixed purpose of timestamping and providing a meaningful way to calculate time elapsed between events or to calculate how long to perform a programmatic task.
FAQs
> Is HighPrecisionTimeStamps Deprecated?
It appears there are some versions of HighPrecisionTimeStamps that are deprecated.
> What is the deprecation date for the latest version of HighPrecisionTimeStamps?
The latest version of HighPrecisionTimeStamps was released on Oct 1, 2021, and it is now deprecated.
> What does deprecated mean?
Deprecated means that the package was either marked as deprecated on the package registry, or that the source code repository for the package was archived.