| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110 |
- //
- // System.Diagnostics.CounterSample.cs
- //
- // Authors:
- // Jonathan Pryor ([email protected])
- //
- // (C) 2002
- //
- using System;
- using System.Collections;
- using System.Diagnostics;
- namespace System.Diagnostics {
- public struct CounterSample {
-
- private long rawValue;
- private long baseValue;
- private long counterFrequency;
- private long systemFrequency;
- private long timeStamp;
- private long timeStamp100nSec;
- private long counterTimeStamp;
- private PerformanceCounterType counterType;
- CounterSample (long rawValue,
- long baseValue,
- long counterFrequency,
- long systemFrequency,
- long timeStamp,
- long timeStamp100nSec,
- PerformanceCounterType counterType)
- : this (rawValue, baseValue, counterFrequency,
- systemFrequency, timeStamp, timeStamp100nSec,
- counterType, 0)
- {
- }
- CounterSample (long rawValue,
- long baseValue,
- long counterFrequency,
- long systemFrequency,
- long timeStamp,
- long timeStamp100nSec,
- PerformanceCounterType counterType,
- long counterTimeStamp)
- {
- this.rawValue = rawValue;
- this.baseValue = baseValue;
- this.counterFrequency = counterFrequency;
- this.systemFrequency = systemFrequency;
- this.timeStamp = timeStamp;
- this.timeStamp100nSec = timeStamp100nSec;
- this.counterType = counterType;
- this.counterTimeStamp = counterTimeStamp;
- }
- public static CounterSample Empty = new CounterSample (
- 0, 0, 0, 0, 0, 0,
- PerformanceCounterType.NumberOfItems32,
- 0);
- public long BaseValue {
- get {return baseValue;}
- }
- public long CounterFrequency {
- get {return counterFrequency;}
- }
- public long CounterTimeStamp {
- get {return counterTimeStamp;}
- }
- public PerformanceCounterType CounterType {
- get {return counterType;}
- }
- public long RawValue {
- get {return rawValue;}
- }
- public long SystemFrequency {
- get {return systemFrequency;}
- }
- public long TimeStamp {
- get {return timeStamp;}
- }
- public long TimeStamp100nSec {
- get {return timeStamp100nSec;}
- }
- // [MonoTODO("What's the algorithm?")]
- // public static float Calculate (CounterSample counterSample)
- // {
- // throw new NotSupportedException ();
- // }
- //
- // [MonoTODO("What's the algorithm?")]
- // public static float Calculate (CounterSample counterSample,
- // CounterSample nextCounterSample)
- // {
- // throw new NotSupportedException ();
- // }
- }
- }
|