Hey, I’m looking for a way to make a high-accuracy and reliable timer in Unity.
I’m looking to use it for psychology research, because I’m relatively good at Unity compared to other programs, but this kind of accuracy is beyong my skill level.
I’m looking for at least 5 decimals after seconds, that is precision to the 0.00001 second. (preferably even 6 decimals but 5 is enough) Of course, it also has to be reliable accross machines.
I’ve looked at a few things but the accuracy isn’t even close to this so I’d appreciate whatever ideas you might have.
Timing with high accuracy is a larger issue in itself, not so much Unity specific, I’d say. You can star your own thread in Unity and start counting time, but you will always run into troubles caused by performance hiccups caused by the operating system, for example. And of course the timer itself is not of much unless you can start and stop it accurately, but user input and graphical UI will need to sync to the main thread in most common applications, so you probably need specific hardware support, e.g. a button or LED lights which trigger at high precision.
All in all I wonder, why you would need this precision for you experiment. I by no means know much about the field, but for example, human reaction time is much more in the region of 0.2 seconds, and this is precision we can simply to in Unity either with a high and stable framerate on the main thread or with a timer running on the second thread, and simply accepting some error when starting and stopping the timer via UI.
Did you find any solution for that @Lesockmonkey ? I need it for similar research purposes too. Thanks!