Hacker News new | past | comments | ask | show | jobs | submit login

GMail's meter is fine -- it's displaying the state of a value which Google has decreed will increase at a set rate. Unlike Santorum's donations, it's not an unpredictable measurement.



Indeed. It looks like they have their goals set for a long time. http://i.imgur.com/WvYcq.jpg

It finds the closest entry in there to the current value of "new Date().getTime()". Then it just adds (what roughs out to) .000004 for every second's difference between the 0 value and the current getTime() value. So today it reads 10250 MB, which must come from index 2 of that array + enough seconds to add 10 MB and some. Definitely more legit than Santorum's.

Here's the code for the counter (it's embedded in that HTML file) http://pastebin.com/8tebjT79

The actual subtractions of the current time from the one in the array seem to be more detailed than what's put on the page, which is being rounded. A sample of input for format():

    10250.60874337952
    10250.608747448896
    10250.608751518273
    10250.608755583586
    10250.608759652963
    10250.608763722339
    10250.608767787651




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: