ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dennis <>
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">
     <format property="timestamp" pattern="MM/dd/yy HH:mm:ss" />

   <echo>${timestamp}: Compiling Java sources using JDK ${}</echo>
   <javac	destdir="${build.home}"
  <echo>${timestamp}: Finished compile.</echo>

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,

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
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
IBM Development Laboratory B=F6blingen, Germany
Phone: +49/7031/16 -3375, Fax: -4888  -

View raw message