/// <summary> /// Creates a new timed event with start state and tracks its start. /// Disposing the returnd event will record the event completion. /// </summary> /// <param name="category">Event category</param> /// <param name="variable">Timed varaible name</param> /// <param name="description">Event description</param> /// <param name="value">A metric value associated with the event</param> /// <returns>Event as IDisposable</returns> public static IDisposable CreateTimedEvent(Categories category, string variable, string description = "", int?value = null) { if (client == null) { return(DynamoAnalyticsClient.Disposable); } return(client.CreateTimedEvent(category, variable, description, value)); }