/// <summary> /// タスクを追加します /// </summary> public void Add(string text, Action <Action> task) { m_task.Add ( onNext => { OnStartChild?.Invoke(m_name, text); task ( () => { OnFinishChild?.Invoke(m_name, text); onNext(); } ); } ); }
/// <summary> /// タスクを追加します /// </summary> public void Add(string text, Action <Action> task) { m_task.Add ( onEnded => { OnStartChild?.Invoke(m_name, text); var startTime = Time.realtimeSinceStartup; task ( () => { OnFinishChild?.Invoke(m_name, text, Time.realtimeSinceStartup - startTime); onEnded(); } ); } ); }
/// <summary> /// タスクを追加します /// </summary> public void Add(string text, Action <Action> task) { m_task.Add ( onNext => { OnStartChild?.Invoke(m_name, text); var startTime = Time.realtimeSinceStartup; var gcWatcher = new GCWatcher(); gcWatcher.Start(); task ( () => { gcWatcher.Stop(); OnFinishChild?.Invoke(m_name, text, Time.realtimeSinceStartup - startTime, gcWatcher.Count); onNext(); } ); } ); }