ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yee, Richard K CTR DMDC" <Richard.Yee....@osd.pentagon.mil>
Subject RE: about Stopwatch
Date Mon, 01 May 2006 15:30:34 GMT
There is a StopWatch class in the Jakarta Commons Lang library. It is in the
org.apache.commons.lang.time package.
 
-Richard
 

-----Original Message-----
From: buffoonguo@gmail.com [mailto:buffoonguo@gmail.com] 
Sent: Saturday, April 29, 2006 5:56 PM
To: user-java@ibatis.apache.org
Subject: Re: about Stopwatch


Thanks.


On 4/30/06, Clinton Begin <clinton.begin@gmail.com
<mailto:clinton.begin@gmail.com> > wrote: 


Stopwatch isn't supported.  Feel free to use it, but don't count on it being
there.

Cheers,

Clinton



On 4/28/06, 悠云 <  <mailto:buffoonguo@gmail.com> buffoonguo@gmail.com>
wrote: 

Hello,everyone.
I have got iBATIS's source code from Subversion.I have a question after I
read the source of Stopwatch(com.ibatis.common.util.Stopwatch).
In the source , it is:
/**
   * Start (create) a task
   * @param taskName - the name of the task
   */
  public void start(String taskName) {
    if (log.isDebugEnabled()) {
      log.debug("Starting: " + taskName); 
    }
    this.currentTaskName = taskName;
    currentTaskTime = System.currentTimeMillis();
  }
But,when I use this method,the new TaskStat is not created.
I think , it should be like this:
    public void start(String taskName) {
        if (log.isDebugEnabled()) {
            log.debug("Starting: " + taskName);
        }
        this.currentTaskName = taskName; 
        currentTaskTime = System.currentTimeMillis();
        appendTaskTime(currentTaskName, currentTaskTime);
    }





Mime
View raw message