• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How long a thread has been running

 
Adamu Yifru
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there a way to tell how long a thread has been running?
thanks in advance.
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24212
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Only by recording the time at which you started it. If it's just some random thread, I don't believe there's any way to tell.
 
Vinod Chandana
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Adamu Yifru:
Is there a way to tell how long a thread has been running?
thanks in advance.

hi,
In a way Ernest is right. But probably it is possible to try to find the execution time of a thread. Look at the code I have attached. Let me tell you that this is not really accurate. But it kinda works. Hope this helps.
Regards,
Vinod.
Make me a cowboy!!!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic