Re: clj-time/do-at not workin as expected

2016-05-20 Thread JvJ
Actually, I've been using async channels the whole time.  I just wanted to 
use scheduling rather than timeouts if possible.  So, I'd like to be able 
to say "wait until this time" instead of "wait for an amount of time".

On Friday, 20 May 2016 01:29:20 UTC-7, Colin Yates wrote:
>
> Have you considered using async channels? 
> JvJ writes: 
>
> > Chime seems great, but I'm looking for something cross-platform 
> (java/js). 
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: clj-time/do-at not workin as expected

2016-05-20 Thread Colin Yates
Have you considered using async channels?
JvJ writes:

> Chime seems great, but I'm looking for something cross-platform (java/js).

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: clj-time/do-at not workin as expected

2016-05-20 Thread JvJ
Chime seems great, but I'm looking for something cross-platform (java/js).

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: clj-time/do-at not workin as expected

2016-05-20 Thread craig worrall
Chime?

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: clj-time/do-at not workin as expected

2016-05-19 Thread Fluid Dynamics
On Thursday, May 19, 2016 at 11:39:40 PM UTC-4, JvJ wrote:
>
> Ooooh, now I get it.  Is there something equivalent do the kind of delayed 
> operation I'm expecting?
>

Well, there's always (future (Thread/sleep x) (f args)) ...

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: clj-time/do-at not workin as expected

2016-05-19 Thread JvJ
Ooooh, now I get it.  Is there something equivalent do the kind of delayed 
operation I'm expecting?

On Thursday, 19 May 2016 20:22:31 UTC-7, Sean Corfield wrote:
>
> The docstring could be clearer…
>
>  
>
> The do-at macro (which uses the do-at* function), evaluates the expression 
> in the context of the time being what you specified. Mostly useful for 
> testing I suspect:
>
>  
>
> boot.user=> (t/do-at (-> 1 t/minutes t/from-now) (println "Hi!" (t/now)))
>
> Hi! #object[org.joda.time.DateTime 0x169f53b5 2016-05-20T03:20:53.021Z]
>
> nil
>
> boot.user=> (t/now)
>
> #object[org.joda.time.DateTime 0x11798c1b "2016-05-20T03:19:54.145Z"]
>
>  
>
> See how the time printed is a minute in the future of the actual time?
>
>  
>
> Sean Corfield -- (904) 302-SEAN
> An Architect's View -- http://corfield.org/
>
> "If you're not annoying somebody, you're not really alive."
> -- Margaret Atwood
>
>  
>
> On 5/19/16, 7:52 PM, "JvJ"  behalf of kfjwh...@gmail.com > wrote:
>
>  
>
>
> Whenever I call do-at or do-at*, the result expression is executed 
> immediately instead of at the specified time.
>
>  
>
> specs.core> (tm/do-at* (-> 30 tm/seconds tm/from-now) (fn [] (println 
> "SUP")))
>
> SUP
>
> ;; => nil
>
>  
>
> In the above example, "SUP" is printed instantaneously, even before the 
> return value of do-at* is printed.
>
>  
>
> Is this a bug, or is there some other reason for it?
>
>  
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: clj-time/do-at not workin as expected

2016-05-19 Thread Sean Corfield
The docstring could be clearer…

 

The do-at macro (which uses the do-at* function), evaluates the expression in 
the context of the time being what you specified. Mostly useful for testing I 
suspect:

 

boot.user=> (t/do-at (-> 1 t/minutes t/from-now) (println "Hi!" (t/now)))

Hi! #object[org.joda.time.DateTime 0x169f53b5 2016-05-20T03:20:53.021Z]

nil

boot.user=> (t/now)

#object[org.joda.time.DateTime 0x11798c1b "2016-05-20T03:19:54.145Z"]

 

See how the time printed is a minute in the future of the actual time?

 

Sean Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood


 

On 5/19/16, 7:52 PM, "JvJ"  wrote:

 


Whenever I call do-at or do-at*, the result expression is executed immediately 
instead of at the specified time.

 

specs.core> (tm/do-at* (-> 30 tm/seconds tm/from-now) (fn [] (println "SUP")))

SUP

;; => nil

 

In the above example, "SUP" is printed instantaneously, even before the return 
value of do-at* is printed.

 

Is this a bug, or is there some other reason for it?

 

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


clj-time/do-at not workin as expected

2016-05-19 Thread JvJ

Whenever I call do-at or do-at*, the result expression is executed 
immediately instead of at the specified time.

specs.core> (tm/do-at* (-> 30 tm/seconds tm/from-now) (fn [] (println 
"SUP")))
SUP
;; => nil


In the above example, "SUP" is printed instantaneously, even before the 
return value of do-at* is printed.

Is this a bug, or is there some other reason for it?

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.