コード例 #1
0
 /// <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();
         }
         );
     }
     );
 }
コード例 #2
0
 /// <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();
         }
         );
     }
     );
 }
コード例 #3
0
 /// <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();
         }
         );
     }
     );
 }