This is StatusClock rewritten in C#