Re: [dev] golang: time.Tick() and ntp

2014-10-09 Thread Silvan Jegen
Hi Markus On Thu, Oct 09, 2014 at 01:31:53PM +0200, Markus Teich wrote: > Silvan Jegen wrote: > > I think you could use http://golang.org/pkg/time/#Time.Zone to > > occasionally check wether the time zone has changed since the script has > > been started and then use http://golang.org/pkg/time/#Pa

Re: [dev] golang: time.Tick() and ntp

2014-10-09 Thread hiro
You can also use one of those alarm clocks with radio sync for 2 euros and put it on your desk. They even come with one additional useful feature: alarms. The font is also bigger and you don't waste real-screen estate and even if something like mplayer is full-screen you don't miss the time when yo

Re: [dev] golang: time.Tick() and ntp

2014-10-09 Thread stanio
* Simon Lieb 2014-10-09 16:10 > What about using the ClkStatusText click in dwm’s config.h buttons array > to send status bar content to X selections ? what about sending date directly to X selections? :o) I mean, I get your point. Let me try another formulation: apart from looking at i

Re: [dev] golang: time.Tick() and ntp

2014-10-09 Thread stanio
* Markus Teich 2014-10-09 16:01 > I have no watch. They always break in the first year of wearing them. get an analogue, manual one, give it some love and it will love you for many years. > Also I > seldomly would like to copy the time to some place, so look-at-only is pretty > good for me. if

Re: [dev] golang: time.Tick() and ntp

2014-10-09 Thread stanio
* Martti Kühne 2014-10-09 15:59 > ...sorry, but what about screenshots? sure, it is that simple: xwd | cut -d' ' -f6-11 | ocr | xclip -i ok, I admit, I should have written “for the most part” to be correct. --s

Re: [dev] golang: time.Tick() and ntp

2014-10-09 Thread Simon Lieb
On 2014-10-09 15:54:22 +0200, sta...@cs.tu-berlin.de wrote: > the status bar is not selectable, or modifiable, it is not even > read-only (you can't save it, colpy it etc.), it is look-at-only. What about using the ClkStatusText click in dwm’s config.h buttons array to send status bar content to

Re: [dev] golang: time.Tick() and ntp

2014-10-09 Thread Markus Teich
sta...@cs.tu-berlin.de wrote: > very good point: does one need the time in the status if one has a a watch. > > the status bar is not selectable, or modifiable, it is not even read-only (you > can't save it, colpy it etc.), it is look-at-only. Heyho, I have no watch. They always break in the fir

Re: [dev] golang: time.Tick() and ntp

2014-10-09 Thread Martti Kühne
On Thu, Oct 9, 2014 at 3:54 PM, wrote: > > the status bar is not selectable, or modifiable, it is not even > read-only (you can't save it, colpy it etc.), it is look-at-only. ...sorry, but what about screenshots? cheers! mar77i

Re: [dev] golang: time.Tick() and ntp

2014-10-09 Thread stanio
* hiro 2014-10-09 15:10 > then buy a watch. very good point: does one need the time in the status if one has a a watch. the status bar is not selectable, or modifiable, it is not even read-only (you can't save it, colpy it etc.), it is look-at-only. think about this

Re: [dev] golang: time.Tick() and ntp

2014-10-09 Thread hiro
then buy a watch.

Re: [dev] golang: time.Tick() and ntp

2014-10-09 Thread Markus Teich
hiro wrote: > you can use date(1) for this. Of course, but I want to avoid starting an additional process every second just to get the time. --Markus

Re: [dev] golang: time.Tick() and ntp

2014-10-09 Thread hiro
you can use date(1) for this.

Re: [dev] golang: time.Tick() and ntp

2014-10-09 Thread Markus Teich
Brandon Mulcahy wrote: > I think a "correct" solution would be: > > time.Sleep(-time.Since(time.Now().Add(time.Second).Truncate(time.Second))) Thanks for the hint Brandon, however I just shifted the delay before the loop inside. I think it's a little bit more readable: var now = tim

Re: [dev] golang: time.Tick() and ntp

2014-10-09 Thread Markus Teich
Silvan Jegen wrote: > I think you could use http://golang.org/pkg/time/#Time.Zone to > occasionally check wether the time zone has changed since the script has > been started and then use http://golang.org/pkg/time/#ParseInLocation to > output the time. Heyho Silvan, time.Now().Zone() does not no

Re: [dev] [9base][patch] install lib9.a

2014-10-09 Thread Dimitris Papastamos
On Wed, Oct 08, 2014 at 01:56:20PM -0700, Evan Gates wrote: > This patch installs lib9.a in ${DESTDIR}${PREFIX}/lib/ so it can be > linked against with -l9 (given the correct -L). I found that necessary > to compile y.tab.c generated by 9base's yacc due to sprint(). > > -emg Applied, thanks Evan.

Re: [dev] golang: time.Tick() and ntp

2014-10-09 Thread Silvan Jegen
On Thu, Oct 09, 2014 at 04:33:57AM +0200, Markus Teich wrote: > Silvan Jegen wrote: > > In this issue https://code.google.com/p/go/issues/detail?id=6007 in answer > > #30 > > they mention that they use a monotonic clock on Linux now with Go 1.3 and up > > which should solve this (this is the commi