On Sun, Mar 7, 2010 at 3:15 PM, Eric Blossom <address@hidden>
On Sun, Mar 07, 2010 at 02:05:12PM -0500, Bishal Thapa wrote:I seriously doubt it ever take 309us :-)
> I have an interesting observation to share, and I want to see if anybody
> can help me shed some light. When I measure time in python in the following
> t1 = datetime.now()
> diff = t2.microsecond - t1.microsecond
> print "Difference %d", diff
> I get very different time benchmarks..it goes from 309 microseconds
> (minimum) to all the way 1 second(max). Do you know why this thread spawning
> is taking such a variety of time after flowgraph start()??
If you subtract two datetimes you get a timedelta.
See the docs.
delta = t2 - t1
t1 = datetime.now()