Hacker News new | comments | show | ask | jobs | submit login
Start a timer via the url (alrt.io)
98 points by bpierre on Feb 8, 2013 | hide | past | web | favorite | 36 comments

The timeLeft -= 1000 approach is not the best one because setTimeout doesn't guarantee when the next tick is gonna happen.

Just open the JS console and type:

  for (var i = 0; i < 1e7; i++) {}
You will block the JS execution and your next tick will happen when the loop finishes. Using new Date().getTime() should do the job.

Edited for formatting.

Scrolling in iOS also stops setTimeout being called.

I fixed that, thanks :)

I've been using http://e.ggtimer.com/ for a while, seems a bit more comprehensive.

thx to this comment, i created now a fluid-app for me with eggtimer.com! there is always a time when u need one (and ur too lazy to ask siri to do it ;) )

but now i would love to have a option on fluid, that ask me for parameter when it starts, so i can set the timeframe when i start the "app"

Yes, its the same principle, but tested for years. They also have a non-flash ("mobile") version: e.ggtimer.com/m/5minutes

Note: if you put in a time in hours higher than http://alrt.io/80063993375h (such as http://alrt.io/80063993376h ), your timer may go off a second early, as it skips the first :59 on Mac OS X Safari/Chrome, going straight from :00 to :58.

I don't imagine this bug would cause much misfortune, though.

Simple and cool. How about making the URLs more human readable:


instead of

The %20 makes it really hard to parse.

Not sure if it's updated since you wrote this, but you can do

Still %20s in long format URLs though

http://alrt.io/2minutes50seconds <- works just fine, or at least it does now.

Cool to see others doing this too!

We've (Sleep.fm) allowed users to set our online alarm clock by typing or clicking a URL(sets time & sound).


http://sleep.fm/7am (sets alarm for 7am)

http://sleep.fm/10pmRooster (sets alarm for 10pm; sound is Rooster)

http://sleep.fm/6amWeather (sets alarm for 6am; sound is spoken weather report)

I think it needs to be able to flash the favicon, when you have several tabs open, you can't see the title change.

If you pin the tab, Firefox and Chrome should glow the favicon on title change.


Cool I've been using http://steep.it/ but this is more flexible

Cool. I wrote something like this to alert me when its time to pick up my daughter from school. Though in my implementation it starts playing a very annoying alarm (I always have headphones on). Congrats on shipping!

Am I misunderstanding something? I tried starting it thusly: http://alrt.io/3%20hours%2022%20minutes

Is the point not that it can handle a variety of input?

If you change "minutes" to "minute", it seems to work.

There's a clear bug in the parser. If you change 'minutes' with 'seconds', it works.

Sloppy programming :/

i fixed it, the parsing regex should be more stable now

Now, on alert completion do this:

  window.location.href = 'nyan.cat';
Neat little app, nice to see a simple non-Flash version of http://e.ggtimer.com

This would be great. It could definitely use a fun alert or a way for a user to make their own alert via some url.


I think you missed the point of this. Try again.

Great idea! Is the source anywhere? Would be cool too language processing for something like http://alrt.io/three%20hours

yes, see https://github.com/juliangruber/alrt.io

Patches are always welcome!

This is pretty neat. But I'm having a hard time understanding why should this be a web app ? When are we getting seamless installation of things like that ?

if on a public computer it would probably be a pain to find an alarm to go off after a certain amount of time. i think it could be pretty handy. easier than getting phone out and setting one there

Reminds me of http://www.timer-tab.com/ although I don't think timer-tab support url instantiation.


would be nice to have window.focus() added to your notifyWindow() javascript function, that way it gets my attention. :-)

Well there's one hour and three seconds I'll never get back.

Neat idea - will be great for timing board games.

Cool, always good to have a countdown timer for monotonous things like stretching.

the code for this site is open source: https://github.com/juliangruber/alrt.io

there is a progress indicator in the favicon now!

what about milliseconds? no love there? :)

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