Hacker News new | ask | show | jobs
by jroseattle 4859 days ago
Here's the unminified JS on the site responsible for the numbers updates.

   var kd = function () {
    function a() {
        e = e || Q("number_of_seconds");
        d = d || Q("searches_count_num");
        f = f || Q("searches_count_unit");
        var a = ~~ (((new Date).getTime() - h) / 1E3 % 86400),
            k = a * b + "";
        f.innerHTML = " " + c[Math.ceil(k.length / 3)] || "";
        e.innerHTML = a;
        d.innerHTML = k.replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,")
    }
    var b = ~~ (1E11 / 2592E3),
        c = " hundred thousand million billion trillion quadrillion quintillion sextillion septillion octillion nonillion decillion undecillion duodecillion tredecillion quattuordecillion quindecillion sexdecillion septendecillion octodecillion novemdecillion vigintillion".split(" "),
        e, d, f, h = (new Date).getTime();
    return {
        hc: a,
        rb: function () {
            a();
            setInterval(a, 100)
        }
    }
   }();
It's just running on an interval and doing in-page calculations, so it's entirely estimated. The value of "b" in this function evaluates to a little over 38,000 (https://www.google.com/search?q=1E11+%2F+2592E3) which they're using as the basis for the calculation.