You need a System.Windows.Forms.Timer-object that counts your time and a .tick-event that will trigger when the time has come. However you need to stop (and dispose) the timer or it will keep on triggering the event even when the window is closed. (In Powershell ISE that could cause windows to close as soon as you load them). To grab the timer from within it's own event you need to adress it in the right scope. I used the global-scope for that.
I want a simple task timer or stopwatch that I can pause and restart. I would like it to look decent, minimal and be able to run "always on top" of other windows. Ideally, no chrome (windows close button, minimize, border, etc).
df19127ead