Interesting. But it would give me two interfering frequencies at the same 
time, which is not what I want. Also it feels inflexible that for every 
possible frequency I would have to hardcode a separate select branch. 
Thanks anyway.

Am Dienstag, 30. August 2016 21:46:46 UTC+2 schrieb freeformz:
>
> How about something like this? https://play.golang.org/p/U50n3cqIXg
>
> On Tue, Aug 30, 2016 at 12:42 PM Aaron Cannon <
> can...@fireantproductions.com <javascript:>> wrote:
>
>> How about creating a custom ticker that uses time.Sleep.  There might
>> be some hidden caveats when using time.Sleep verses a real ticker that
>> I am unaware of, but it might meet your needs.  You could then add a
>> custom method, or inbound channel, which you could use to tweak its
>> intervals on the fly.
>>
>> Aaron
>>
>> On 8/30/16, seb....@gmail.com <javascript:> <seb....@gmail.com 
>> <javascript:>> wrote:
>> > In my application I select on a ticker channel, but sometimes need to 
>> have
>> > the waiting time vary a bit. For not so frequent changes I could make a 
>> new
>> >
>> > ticker everytime, but I have the feeling this is not the best solution 
>> for
>> > higher frequencies and many rate changes. Best would be if I could tell 
>> my
>> > existing ticker "from next tick on please use an interval of x". In fact
>> > what I want is that the frequency changes over time.
>> >
>> > Any tips how to achieve that?
>> >
>> > --
>> > You received this message because you are subscribed to the Google 
>> Groups
>> > "golang-nuts" group.
>> > To unsubscribe from this group and stop receiving emails from it, send 
>> an
>> > email to golang-nuts...@googlegroups.com <javascript:>.
>> > For more options, visit https://groups.google.com/d/optout.
>> >
>>
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "golang-nuts" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to golang-nuts...@googlegroups.com <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to