Initial Commit

This commit is contained in:
2024-03-13 18:23:27 -04:00
commit 7f4466d810
36 changed files with 1374 additions and 0 deletions

47
Profiler.cs Normal file
View File

@@ -0,0 +1,47 @@
using System;
using System.Runtime.InteropServices;
using System.Collections;
using System.Text;
// Filename: Profiler.cs
// Author:Sean Kessler
namespace IPMonitor
{
/// <summary>Profiler - Profiler utility class</summary>
public class Profiler
{
[DllImport("kernel32.dll")]
static extern uint GetTickCount();
private uint elapsedTime;
private uint totalTime;
public Profiler()
{
totalTime = GetTickCount();
Start();
}
public void Reset()
{
totalTime = GetTickCount();
Start();
}
public void Start()
{
elapsedTime = GetTickCount();
}
public uint Split()
{
return GetTickCount() - elapsedTime;
}
public uint Stop()
{
return elapsedTime = GetTickCount() - elapsedTime;
}
public uint End()
{
return totalTime = GetTickCount() - totalTime;
}
}
}