From 6cdb03f63248c74eed32c5b9b0d71cd156065210 Mon Sep 17 00:00:00 2001 From: Weihan Li Date: Sun, 7 Dec 2025 19:36:15 +0800 Subject: [PATCH] Removing unnecessary conditional check Removed preprocessor directive for ArgumentNullException check. --- src/libraries/Common/src/System/TimeProvider.cs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/libraries/Common/src/System/TimeProvider.cs b/src/libraries/Common/src/System/TimeProvider.cs index e28275393b6ff0..cc7cd3df10a7b3 100644 --- a/src/libraries/Common/src/System/TimeProvider.cs +++ b/src/libraries/Common/src/System/TimeProvider.cs @@ -159,11 +159,7 @@ public TimeSpan GetElapsedTime(long startingTimestamp, long endingTimestamp) /// public virtual ITimer CreateTimer(TimerCallback callback, object? state, TimeSpan dueTime, TimeSpan period) { -#if SYSTEM_PRIVATE_CORELIB - ArgumentNullException.ThrowIfNull(callback); -#else ArgumentNullException.ThrowIfNull(callback); -#endif // SYSTEM_PRIVATE_CORELIB return new SystemTimeProviderTimer(dueTime, period, callback, state); }