*
The moose likes Beginning Java and the fly likes block timer Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "block timer" Watch "block timer" New topic
Author

block timer

chuck johnson
Greenhorn

Joined: Dec 10, 2002
Posts: 2
i need to basically wrap some sort of timer around a block of code. i need to be able to print out how long it took to execute that particular block of code. i've looked through the api and the books i have, but i cant find anything helpful. any ideas?
Sam Smoot
Ranch Hand

Joined: Apr 18, 2002
Posts: 238
try this:


CNSS/NSA Infosec Professional,<br />Software Engineer
chuck johnson
Greenhorn

Joined: Dec 10, 2002
Posts: 2
thanks a lot. just off-hand, do you happen to know what kind a units that is in?
Norm Miller
Ranch Hand

Joined: May 21, 2002
Posts: 56
milliseconds
Sam Smoot
Ranch Hand

Joined: Apr 18, 2002
Posts: 238
Cast as a long...
Units are milliseconds... (1,000 = 1 second)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: block timer
 
Similar Threads
Gui animation
Balls are not moving
Auto-submit <form> to a servlet.
Time-based responses in a JFrame?
NPE when trying to get size() in ArrayList