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();
}
* 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);
}
if (log.isDebugEnabled()) {
log.debug("Starting: " + taskName);
}
this.currentTaskName = taskName;
currentTaskTime = System.currentTimeMillis();
appendTaskTime(currentTaskName, currentTaskTime);
}
