Re: [go-nuts] Issues with time.Time

2022-07-21 Thread Andrew Phillips
Thanks for the feedback. I should explain that efficiency is not (currently) a problem. The thing I love about Go is that there is always a simple and obvious (and reasonably efficient) way to do things. I'm currently call time.Now().UTC() no more than a few thousand times per second and

Re: [go-nuts] Issues with time.Time

2022-07-19 Thread Slawomir Pryczek
Have you tried starting a simple thread which will update some variable every 100ms (for example), and then just get value of this variable? Using atomic functions. I believe memcached was 'caching' calls to get time this way and it won't probably be very accurate (as we don't have hard

Re: [go-nuts] Issues with time.Time

2022-07-18 Thread Ian Lance Taylor
On Sun, Jul 17, 2022 at 6:20 AM Andrew Phillips wrote: > > I've discovered a few problems with time.Time but thought I better discuss > here first before creating issues at https://github.com/golang/go/issues (in > case I missed something obvious :). These are mainly performance issues, but >

[go-nuts] Issues with time.Time

2022-07-17 Thread Andrew Phillips
I've discovered a few problems with time.Time but thought I better discuss here first before creating issues at https://github.com/golang/go/issues (in case I missed something obvious :). These are mainly performance issues, but there is also the serious problem that it is easy to