Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
ProcessInfo.cs
Go to the documentation of this file.
1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Text;
5 
6 namespace SiliconStudio.Paradox.DebugTools.DataStructures
7 {
8  public class ProcessInfo
9  {
10  public List<FrameInfo> Frames { get; private set; }
11 
12  public ProcessInfo()
13  {
14  Frames = new List<FrameInfo>();
15  }
16 
18  {
19  ProcessInfo duplicate = new ProcessInfo();
20 
21  Frames.ForEach(item => duplicate.Frames.Add(item.Duplicate()));
22 
23  return duplicate;
24  }
25 
26  public double BeginTime
27  {
28  get
29  {
30  if (Frames == null || Frames.Count == 0)
31  return -1.0;
32  return Frames[0].BeginTime;
33  }
34  }
35 
36  public double EndTime
37  {
38  get
39  {
40  if (Frames == null || Frames.Count == 0)
41  return -1.0;
42  return Frames[Frames.Count - 1].EndTime;
43  }
44  }
45 
46  public double TimeLength
47  {
48  get
49  {
50  if (Frames == null || Frames.Count == 0)
51  return -1.0;
52  return Frames[Frames.Count - 1].EndTime - Frames[0].BeginTime;
53  }
54  }
55  }
56 }