Skip to content

Instantly share code, notes, and snippets.

@FGRibreau
Last active July 22, 2017 17:39
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FGRibreau/52d7f42e009e9149c18d to your computer and use it in GitHub Desktop.
Save FGRibreau/52d7f42e009e9149c18d to your computer and use it in GitHub Desktop.
Human Benchmark
// Cleaner approach than setInterval + click.
var t = angular.element(document.querySelector('.reaction-time-test')).scope().test;
t.trials = Array.apply(null, new Array(5)).map(function(a){
var trial = t.nextTrial();
trial.result = 100;
trial.timeWaited = 3000+~~(Math.random() * 1000);
return trial;
});
t.save();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment