New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: Add Environment.LongTickCount #28754
Comments
There is precedent for adding public int PeakWorkingSet { get { throw null; } }
public long PeakWorkingSet64 { get { throw null; } } also public abstract partial class Array
{
public int Length { get { throw null; } }
public long LongLength { get { throw null; } }
} So it's worth considering public static class Environment
{
public static long TickCount64 { get; }
} |
There's also Enumerable.LongCount. But I'd be fine with either the Long prefix or the 64 suffix. |
Right I only looked at properties |
I think The framework guidelines also recommend not using language specific names (like |
Re: language-specific names, my favorite bug/gotcha in this regard is The only reason "long" is halfway acceptable in this regard is because it can be interpreted as a modifier rather than a type name (e.g. |
The most logical API proposal would be, which looks fine to me. public static class Environment
{
public static long TickCount64 { get; }
} I'll bring it up in the next API review. |
And we landed on: public static class Environment
{
public static long TickCount64 { get; }
} |
Should we mark up for grabs or is someone planning to take this? |
Environment.TickCount rolls over, which makes it inconvenient to use. See e.g. dotnet/corefx#35401
To remedy this, we should add Environment.LongTickCount. This is trivial to implement on Windows using GetTickCount64.
The text was updated successfully, but these errors were encountered: