Sebastian hi,
I think, the 'Elapsed Time' property is the most recommended for your scenario and, it can be accessed only via a proxy variable, sorry! The Elapsed Time has sub-millisecond precision but be aware that the Control Loop snippet is typically called once per 1 millisecond. Moreover, the 1 ms calling rate is not guaranteed, since it can drop significantly, if EventIDE core is occupied with other task.
Still, you can access the high-precision timer in the snippets, using the Stopwatch class in C#,e.g.:
System.Diagnostics.Stopwatch sw = System.Diagnostics.Stopwatch.StartNew();
for (int i=0;i<100;i++)
{
long TimerValue = sw.ElapsedMilliseconds;
}
Note that the Stopwatch instance has to be declared in the snippets with the full namespace- System.Diagnostics.Stopwatch
Personally, I would recommend to implement the pump state machine with the EventIDE events. For instance, you can create 2 recurrent non-visual sub-events for the ON and OFF states of the pump, and control timing by the events' Duration properties. It may give you the better timing precision in comparison to any implementation in the code snippets.