Example #1
0
        public RoutineStats[] GetStats()
        {
            if (m_Fiber == null)
            {
                return(new RoutineStats[0]);
            }

            RoutineStats[] stats = new RoutineStats[1];
            stats[0] = m_Fiber.GetStats();
            return(stats);
        }
Example #2
0
        /// <summary>
        /// Returns an array of stats on all currently
        /// running Routines.
        /// </summary>
        public RoutineStats[] GetRoutineStats()
        {
            if (Fibers.TotalActive == 0)
            {
                return(null);
            }

            RoutineStats[] stats = new RoutineStats[Fibers.TotalActive];

            int   next  = 0;
            Fiber fiber = Fibers.StartActive(ref next);
            int   i     = 0;

            while (fiber != null)
            {
                stats[i++] = fiber.GetStats();
                fiber      = Fibers.TraverseActive(ref next);
            }

            return(stats);
        }