Live data from Hacker News

Google timer

google.com

11–20 of 157 posts

Re: Google timer

#11

A script I use for this occasionally: #!/usr/bin/env ruby done = Time.now + ARGV[0].to_i while(true) do sleep(10) `say "Time's up!"` if Time.now > done end Or the alarm clock version: #!/usr/bin/env ruby require 'time' done = Time.parse(ARGV[0]) while(true) do sleep(10) `say "Time's up!"` if Time.now > done end

My alarm clock 15 years ago was:

    $ sleep 28800; while :; do cat /etc/termcap; done > /dev/audio
These days /etc/termcap is disappearing from UNIX machines, but back then it was always available. I found it had just the right amount of structure to make a really annoying noise.

Re: Google timer

#12
post #6

If you want to break it, search for "timer for 23 hours 59 minutes 60 seconds" ... For some reason the code seems to be configured to max out at 24 hours. I am too busy dealing with my own broken JavaScript code to take a look, but maybe someone here can view source and figure out why they made that decision?

I'm guessing they decided they had to put a limit somewhere to ensure nothing broke, and decided arbitrarily on that.

Re: Google timer

#13
post #7

Nothing happens at that page for me. Could the reason be that I'm redirected to google.se (which does not have this feature, yet)?

I tried it on google.com/ncr and it didn't work there either...

I had to hit "Request desktop site" for it to work for me (Chrome, Android, Australia.)

Re: Google timer

#15

A script I use for this occasionally: #!/usr/bin/env ruby done = Time.now + ARGV[0].to_i while(true) do sleep(10) `say "Time's up!"` if Time.now > done end Or the alarm clock version: #!/usr/bin/env ruby require 'time' done = Time.parse(ARGV[0]) while(true) do sleep(10) `say "Time's up!"` if Time.now > done end

My alarm clock 15 years ago was: $ sleep 28800; while :; do cat /etc/termcap; done > /dev/audio These days /etc/termcap is disappearing from UNIX machines, but back then it was always available. I found it had just the right amount of structure to make a really annoying noise.

My occasional alarm clock is:

    $ sleep 8h; mpg123 /pandemonic_hyperblast.mp3
There is no way to fail to wake up with this song http://www.youtube.com/watch?v=U5Den-CQ6jk .

Re: Google timer

#16
post #6

If you want to break it, search for "timer for 23 hours 59 minutes 60 seconds" ... For some reason the code seems to be configured to max out at 24 hours. I am too busy dealing with my own broken JavaScript code to take a look, but maybe someone here can view source and figure out why they made that decision?

I'm guessing they decided they had to put a limit somewhere to ensure nothing broke, and decided arbitrarily on that.

Well, you can set the timer to 99 hours, 59 minutes, 59 seconds if you type in the values, so it doesn't seem to make sense that 23:59:60 would break it. I'm really curious as to why that happens.

Re: Google timer

#18

Earlier quoted context omitted.

My alarm clock 15 years ago was: $ sleep 28800; while :; do cat /etc/termcap; done > /dev/audio These days /etc/termcap is disappearing from UNIX machines, but back then it was always available. I found it had just the right amount of structure to make a really annoying noise.

My occasional alarm clock is: $ sleep 8h; mpg123 /pandemonic_hyperblast.mp3 There is no way to fail to wake up with this song http://www.youtube.com/watch?v=U5Den-CQ6jk .

Heh, I've certainly done the same, albeit with different songs...

Re: Google timer

#19
post #6

If you want to break it, search for "timer for 23 hours 59 minutes 60 seconds" ... For some reason the code seems to be configured to max out at 24 hours. I am too busy dealing with my own broken JavaScript code to take a look, but maybe someone here can view source and figure out why they made that decision?

> but maybe someone here can view source and figure out why they made that decision?

Chances are it's a classic case of choosing a register size such that the time counter wraps around at 86,400 seconds, and to avoid this, they would have to explicitly include days -- and chose not to.

Re: Google timer

#20

Interesting side effect. There's this web site: http://www.online-stopwatch.com/timer/1hour/ which comes up top of the google search results for "timer for 1 hour" for me. Now there is absolutely no way they can compete with Google's own offering from an SEO perspective. While this example is trivial to some extent, does it set a precedent that while you can advertise and compete with Google, they can always have the…

I wondered the same a while back when I'd often get old and out of date Google Code results showing up before the actual Github ones which I wanted.

Not the same feature. Those Google Code pages have better PageRank than the corresponding Github ones (older pages more links?). I don't think Google Code is given any preferential treatment in the results--if so, the UI would be presented differently.
Post reply on HN