# Is there a plugin to see total time spent on reviews? :)

**URL:** https://community.wanikani.com/t/is-there-a-plugin-to-see-total-time-spent-on-reviews/41644
**Category:** Tips & Tricks
**Created:** [January 28, 2020, 4:24am UTC](https://community.wanikani.com/t/is-there-a-plugin-to-see-total-time-spent-on-reviews/41644 "2020-01-28T04:24:37Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![Kumirei](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/kumirei/32/480522_2.png) [@Kumirei](https://community.wanikani.com/u/Kumirei)
#### Post date: [January 28, 2020, 5:48am UTC](https://community.wanikani.com/t/is-there-a-plugin-to-see-total-time-spent-on-reviews/41644/4 "2020-01-28T05:48:15Z")

</div>

Had to download all my post to be able to search through them properly, but I found it.

> [@New People Questions! ~~~\<3 \[Lost?! Confused?! We're here to help!\]](https://community.wanikani.com/t/new-people-questions-3-lost-confused-were-here-to-help/16421/1358):
>
> > [@New People Questions! ~~~\<3 \[Lost?! Confused?! We're here to help!\]](https://community.wanikani.com/t/new-people-questions-3-lost-confused-were-here-to-help/16421/1355):
> >
> > Can anyone suggest a script that would count how much time I’ve used on WK? Really just for being curious. And maybe someday to be able to gawk at all that time used… 😈
> 
> > [@New People Questions! ~~~\<3 \[Lost?! Confused?! We're here to help!\]](https://community.wanikani.com/t/new-people-questions-3-lost-confused-were-here-to-help/16421/1356):
> >
> > As far as I know, there’s no script like that 🤔
> 
> I am actually planning to add this feature for reviews to the heatmap script, and I have the function to calculate it made already. Mind, though, that it doesn’t count any time before August 4 2017, since WK didn’t store review data before then.
> 
> **REQUIRES WANIKANI OPEN FRAMEWORK**  
> Ok, so what you want to do is first cache the reviews and define our functions with this. Open up the console and paste it into there.
> 
> ```javascript
> function cache_reviews() {
> return wkof.Apiv2.fetch_endpoint('reviews').then((review_data)=>{
> var dates = [];
> for (var i=0; i<review_data.data.length; i++) {
> var item = review_data.data[i].data;
> dates.push(Date.parse(item.created_at));
> }
> localStorage.setItem('review_cache', JSON.stringify(dates));
> });
> }
> 
> function time_reviewed(longest_pause) {
> var reviews = JSON.parse(localStorage.getItem('review_cache'));
> var session_start = reviews[0];
> var last = session_start;
> var time = 0;
> var sessions = 1;
> for (var i=1; i<reviews.length; i++) {
> if ((reviews[i]-last)/1000/60 > longest_pause) {
> session_start = reviews[i];
> sessions++;
> }
> else time += reviews[i]-last;
> last = reviews[i];
> }
> console.log('Time reviewed:', (time/1000/60/60).toFixed(2) + 'h');
> console.log('Number of sessions:', sessions);
> }
> 
> cache_reviews()
> 
> ```
> 
> Then you can use the command `time_reviewed(longest_pause)`, where `longest_pause` is replaced with the longest pause (in minutes) between answers allowed. Anything longer than `longest_pause` will not count towards the total time reviewed.
> 
> You will be returned a number of hours and the number of sessions your choice of `longest_pause` results in. If the latter seems high, you might want to calibrate the former. How you interpret these is up to you.
> 
> ![image](https://global.discourse-cdn.com/wanikanicommunity/original/4X/4/f/c/4fc176e0e1dd82f516ae6fab3c82499d25589902.png)

---

_[View the full topic](https://community.wanikani.com/t/is-there-a-plugin-to-see-total-time-spent-on-reviews/41644)._
