Milisecond timing and delay

I am a complete beginner with UE4 but making great progress with my project mainly thanks to the great community! Thank you!

So, my standard way of dealing with timing in UE4 blueprints is to make a loop with a delay set to 1 and then for each loop do +1 to variable time in seconds that is 0 as default.

However if I try to set delay to 0.001 (one milisecond) the loop is actually executing slower than 1 milisecond. Perhaps delay node is not the a good way to do this (the blueprint loop would have to run 1000 times per second)? Does anyone know how to get around this by getting system time perhaps?

I am using UE4 as a component in a scientific study and I am completely dependent on timings being completely accurate (i.e not differing slightly with my frame rate etc), down to at least a milisecond resoltuion. Are there any precautions I should take in general?

You can get time from ticks. If you get a node Event Tick, youโ€™ll see an output called delta seconds. It gives you the exact time between last tick event which occurs every frame. That is not one milisecond but I donโ€™t see much sense in going lower than a frame. Is that enough for you?

Well, at least in blueprints everything is broken down into that tick event and repeated accordingly. So if you want to measure exact inputs you will probably need to go into c++

Surely you would need a very high framerate (1000fps) in order to tick anything at 1 ms intervals?

Well I would like to get reaction time of user between something getting presented on screen to key input in milliseconds if it is possible. Perhaps centiseconds could be enough but that would require a frame rate of 100fps I guess?

Yes, thanks this is what I suspected as well.

Thanks for your help Algirdyz, I guess you are right about that! Is it the same for input i.e when I press a key to trigger blueprint event it waits until the next frame/tic for the event to execute? I guess this is kind of bad news regarding the possibility of doing what I wanted to do in blueprints, I am not good at c++ at all.

Btw, you could also use a Timer instead of a delay loop for this.

Just found this plugin that contains a custom blueprint node that might be useful to me (gets system time with milisecond resolution). I have yet to test it: