Track timer count and add Timer.ActiveCount (#25061)
authorKoundinya Veluri <kouvel@users.noreply.github.com>
Tue, 11 Jun 2019 20:56:40 +0000 (13:56 -0700)
committerStephen Toub <stoub@microsoft.com>
Tue, 11 Jun 2019 20:56:40 +0000 (13:56 -0700)
commit04ed3c779f4a9c8c07643b2e459b0316ba086767
treec56f79d938434bf060fc73d4e1cb2f397ca66306
parent938383a60ffbb716e01dbbf941a239d4bfa7aaf6
Track timer count and add Timer.ActiveCount (#25061)

* Track timer count and add Timer.Count

Part of https://github.com/dotnet/corefx/issues/38422

* Use lock to prevent tearing

* Add assert

* Rename Count to ActiveCount

* Fix build
src/System.Private.CoreLib/shared/System/Threading/Timer.cs