ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dennis <col...@alum.rpi.edu>
Subject RE: Date
Date Tue, 13 May 2003 19:52:59 GMT
Hi All,

In regards to the current date thread that is going on in the list.  I was
wondering if anyone had answered this question posted approx. a year ago about
getting the duration of a task.

At the very least is there anyway to define a <tstamp> property with the proper
formatting and just touch it to get the current time?

E.g. I'd like to be able to do something like this:
<target name="compile" depends="init">
   <tstamp>
     <format property="timestamp" pattern="MM/dd/yy HH:mm:ss" />
   </tstamp>

   <echo>${timestamp}: Compiling Java sources using JDK ${ant.java.version}</echo>
   <javac	destdir="${build.home}"
		srcdir="${src.home}"
  />
  <echo>${timestamp}: Finished compile.</echo>
</target>

Where ${timestamp} would be the time that the echo is being done.  I know that I
could have multiple <tstamp> definitions to accomplish this, but seems very messy.

The original email follows below, Thanks in advance for any suggestions,
Dennis


---------------------------------------------------------
List:     ant-user
Subject:  Execution Duration of a Task
From:     "Juergen Damke" <DAMKE () de ! ibm ! com>
Date:     2002-04-11 8:19:06
[Download message RAW]


Is there a possibillity to echo the duration of certain tasks in a log.=


The idea is to do a <tstamp/> at start and a <tstamp/> at the end and
calulation
the time difference in mins & seconds.

Mit freundlichen Gr=FC=DFen / With best regards
J=FCrgen Damke
______________________________________________________________________
IBM WebSphere Portal Server Development 1, Dept 6547
URL: http://www-4.ibm.com/software/webservers/portal/
IBM Development Laboratory B=F6blingen, Germany
Phone: +49/7031/16 -3375, Fax: -4888  -  MailTo:damke@de.ibm.com=

Mime
View raw message