diff --git a/ICD.Common.Utils/Timers/IcdStopwatch.cs b/ICD.Common.Utils/Timers/IcdStopwatch.cs
index d6d1810..1f9f398 100644
--- a/ICD.Common.Utils/Timers/IcdStopwatch.cs
+++ b/ICD.Common.Utils/Timers/IcdStopwatch.cs
@@ -1,4 +1,5 @@
using System;
+using System.Collections.Generic;
using ICD.Common.Properties;
#if SIMPLSHARP
using Crestron.SimplSharp;
@@ -128,6 +129,22 @@ namespace ICD.Common.Utils.Timers
return output;
}
+ ///
+ /// Profiles getting each item from the enumerable.
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static IEnumerable Profile(IEnumerable enumerable, string name)
+ {
+ using (IEnumerator enumerator = enumerable.GetEnumerator())
+ {
+ while (Profile(() => enumerator.MoveNext(), name))
+ yield return enumerator.Current;
+ }
+ }
+
private static void PrintProfile(IcdStopwatch stopwatch, string name)
{
long elapsed = stopwatch.ElapsedMilliseconds;