Fix from Matt Kunze to add the other Process.Start overloads
[mono.git] / mcs / class / System / System.Diagnostics / CounterSample.cs
1 //
2 // System.Diagnostics.CounterSample.cs
3 //
4 // Authors:
5 //   Jonathan Pryor (jonpryor@vt.edu)
6 //
7 // (C) 2002
8 //
9
10 using System;
11 using System.Collections;
12 using System.Diagnostics;
13
14 namespace System.Diagnostics {
15
16         public struct CounterSample {
17                 
18                 private long rawValue;
19                 private long baseValue;
20                 private long counterFrequency;
21                 private long systemFrequency;
22                 private long timeStamp;
23                 private long timeStamp100nSec; 
24                 private long counterTimeStamp;
25                 private PerformanceCounterType counterType;
26
27                 CounterSample (long rawValue, 
28                         long baseValue, 
29                         long counterFrequency, 
30                         long systemFrequency, 
31                         long timeStamp, 
32                         long timeStamp100nSec, 
33                         PerformanceCounterType counterType)
34                         : this (rawValue, baseValue, counterFrequency, 
35                                 systemFrequency, timeStamp, timeStamp100nSec, 
36                                 counterType, 0)
37                 {
38                 }
39
40                 CounterSample (long rawValue, 
41                         long baseValue, 
42                         long counterFrequency, 
43                         long systemFrequency, 
44                         long timeStamp, 
45                         long timeStamp100nSec, 
46                         PerformanceCounterType counterType, 
47                         long counterTimeStamp)
48                 {
49                         this.rawValue = rawValue;
50                         this.baseValue = baseValue;
51                         this.counterFrequency = counterFrequency;
52                         this.systemFrequency = systemFrequency;
53                         this.timeStamp = timeStamp;
54                         this.timeStamp100nSec = timeStamp100nSec;
55                         this.counterType = counterType;
56                         this.counterTimeStamp = counterTimeStamp;
57                 }
58
59                 public static CounterSample Empty = new CounterSample (
60                         0, 0, 0, 0, 0, 0, 
61                         PerformanceCounterType.NumberOfItems32, 
62                         0);
63
64                 public long BaseValue {
65                         get {return baseValue;}
66                 }
67
68                 public long CounterFrequency {
69                         get {return counterFrequency;}
70                 }
71
72                 public long CounterTimeStamp {
73                         get {return counterTimeStamp;}
74                 }
75
76                 public PerformanceCounterType CounterType {
77                         get {return counterType;}
78                 }
79
80                 public long RawValue {
81                         get {return rawValue;}
82                 }
83
84                 public long SystemFrequency {
85                         get {return systemFrequency;}
86                 }
87
88                 public long TimeStamp {
89                         get {return timeStamp;}
90                 }
91
92                 public long TimeStamp100nSec {
93                         get {return timeStamp100nSec;}
94                 }
95
96 //              [MonoTODO("What's the algorithm?")]
97 //              public static float Calculate (CounterSample counterSample)
98 //              {
99 //                      throw new NotSupportedException ();
100 //              }
101 //
102 //              [MonoTODO("What's the algorithm?")]
103 //              public static float Calculate (CounterSample counterSample,
104 //                      CounterSample nextCounterSample)
105 //              {
106 //                      throw new NotSupportedException ();
107 //              }
108         }
109 }
110