I am working on a background program that will be running for a long time, and I have a external logging program (SmartInspect) that I want to feed with some values periodic
This code project article describes how to use the high performance timer:
http://www.codeproject.com/KB/cs/highperformancetimercshar.aspx
You can use it to time the execution of your code.
Here you can find a number of open source C# profilers:
http://csharp-source.net/open-source/profile