Permalink
Browse files

Adds attention span calculation and display.

  • Loading branch information...
brettle committed Sep 20, 2011
1 parent 6bc84eb commit f3ddfa7f6a7d881d60a404f70c1c461280672630
Showing with 8 additions and 3 deletions.
  1. +6 −2 index.html
  2. +2 −1 js/script.js
View
@@ -39,9 +39,13 @@
<p>This application estimates the percentage of time you are paying attention to your task by randomly asking you
whether you are on task or distracted. It will automatically adapt the expected interval between prompts based
on your past performance.</p>
- <p>You're current efficiency is:</p>
+ <p>Based on <span id="samples"></span> samples, your estimated attention span is:</p>
<div>
- <span id="efficiency"></span>% based on <span id="samples"></span> samples.
+ <span id="attentionSpan"></span> minutes.
+ </div>
+ <p>Your current efficiency is:</p>
+ <div>
+ <span id="efficiency"></span>%
</div>
<audio id="audioPrompt" preload=auto controls>
<source src="audio/HowsItGoing.ogg" type="audio/ogg"></source>
View
@@ -36,7 +36,8 @@ as = {
},
displayStats: function() {
$("#efficiency").html(Math.round(as.efficiency*100));
- $("#samples").html(as.history.length);
+ $("#attentionSpan").html(Math.round(as.interval/60000));
+ $("#samples").html(as.history.length);
}
};

0 comments on commit f3ddfa7

Please sign in to comment.