Number of Cores Since January 1 2013: <div id="result"></div>
JavaScript
/*Total cores returned in last 12 months: 53,271,862
Divided into 365 days: 145,950 cores collected per day
Divided into 24 hrs per day: 6,081 cores collected per hour
Divided into 60 mins per hour: 101 cored collected per minute
Divided into 60 seconds per minute: 1.69 cores per second*/
var INTERVAL = 1000;
var CORES_PER_SECONS = 1.69;
$(function() {
var now = new Date();
var yearStart = new Date(now.getFullYear(), 0, 1);
console.log("yearStart", yearStart);
var timePassed = Math.round((now - yearStart)/1000);//Time since beginning of year in seconds
var totalCores = timePassed * 1.69;//Total cores since beginning of the year
$('#result').html(Math.round(totalCores));
setInterval(function(){
timePassed = timePassed + INTERVAL/1000;
totalCores = timePassed * 1.69;
$('#result').html(Math.round(totalCores));
}, INTERVAL);
});
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.