ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <jakarta-...@ehatchersolutions.com>
Subject Re: Date
Date Wed, 14 May 2003 03:50:29 GMT
Look at the 'prefix' attribute on <tstamp> to set two different 
properties with times (prefix="before" / prefix="after", for example).

	Erik


On Tuesday, May 13, 2003, at 03:52  PM, Dennis wrote:

> 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=
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>


Mime
View raw message