Department of Biomedical Engineering, School of Life Science, Anhui Medical University, Hefei, Anhui Province, People's Republic of China.
Department of Computer Science, School of Humanistic Medicine, Anhui Medical University, Hefei, Anhui Province, People's Republic of China.
PLoS One. 2020 Jul 10;15(7):e0235249. doi: 10.1371/journal.pone.0235249. eCollection 2020.
Online experiments are growing in popularity. This study aimed to determine the timing accuracy of web technologies and investigate whether they can be used to support high temporal precision psychology experiments. A dynamic sinusoidal grating and flashes were produced by setInterval, CSS3, and requestAnimationFrame (hereafter, rAF) technologies. They were run at normal or real-time priority processing in Chrome, Firefox, Edge, and Internet Explorer on Windows, macOS, and Linux. Timing accuracies were compared with that of Psychtoolbox which was chosen as gold standard. It was found that rAF with real-time priority had the best timing accuracy compared to the other web technologies and had a similar timing accuracy as Psychtoolbox in traditional experiments in most cases. However, rAF exhibited poor timing accuracy on Linux. Therefore, rAF can be used as technical basis for accuracy of millisecond timing sequences in online experiments, thereby benefiting the psychology field.
在线实验越来越受欢迎。本研究旨在确定网络技术的定时精度,并探讨它们是否可用于支持具有高时间精度的心理学实验。通过 setInterval、CSS3 和 requestAnimationFrame(以下简称 rAF)技术生成动态正弦光栅和闪烁。在 Windows、macOS 和 Linux 上的 Chrome、Firefox、Edge 和 Internet Explorer 中以正常或实时优先级处理运行这些技术。将其定时精度与作为黄金标准的 Psychtoolbox 进行比较。结果发现,与其他网络技术相比,具有实时优先级的 rAF 的定时精度最佳,并且在大多数情况下,其定时精度与传统实验中的 Psychtoolbox 相似。然而,rAF 在 Linux 上的定时精度较差。因此,rAF 可作为在线实验中毫秒定时序列精度的技术基础,从而使心理学领域受益。