Thank you for your reply Eric.
  I did print delta and delta.microseconds and guess what I did get this:

Receiver (0) =  BABA0002
Requested RX Bitrate: 100k
Probe Level 39
0:00:00.000327  [*This is from printing delta*]
327  [*This is from printing delta.microseconds*]

Why do you think I should not get 309us? I am sorry if I don't get something
fundamental here. Thanks again for helping me out :)


On Sun, Mar 7, 2010 at 3:15 PM, Eric Blossom <e...@comsec.com> wrote:

> On Sun, Mar 07, 2010 at 02:05:12PM -0500, Bishal Thapa wrote:
> > Hi,
> >   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
> > way:
> >
> > t1 = datetime.now()
> > self.start()
> > t2=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()??
>
> I seriously doubt it ever take 309us :-)
>
> If you subtract two datetimes you get a timedelta.
> See the docs.
>
>  t1 = datetime.now()
>  self.start()
>  t2=datetime.now()
>   delta = t2 - t1
>  print delta
>
> Eric
>
_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to