This is wordy, but *should* work (i.e. I haven't tested): timespan::get-seconds(timespan::from-ticks(datetime::get-ticks(datetime: :now()) - datetime::get-ticks(SomePropertyHoldingTheStartingDatetime)))
... would give you the number of seconds between now and then. For other time types, substitute timespan::get-seconds for timespan::get-minutes, timespan::get-hours, etc. E -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Smith Sent: March 31, 2005 12:35 PM To: [email protected] Subject: [Nant-users] Calculating a span of time I haven't found a way to determine the amount of time between a start and stop time...for instance: <property name="build.starttime" value="${datetime::now()}"/> ...do some stuff that takes time <property name="build.endtime" value="${datetime::now()}"/> I want to know how long between the two time periods in minutes and seconds... I tried to play with the timespan functions, but haven't found a way to successfully convert the property resulting from datetime::now into an Int...or I'm not using them correctly. I imagine there are a couple ways to accomplish this, but hoping for some assistance. Thanks, Robert ------------------------------------------------------- This SF.net email is sponsored by Demarc: A global provider of Threat Management Solutions. Download our HomeAdmin security software for free today! http://www.demarc.com/Info/Sentarus/hamr30 _______________________________________________ Nant-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nant-users ------------------------------------------------------- This SF.net email is sponsored by Demarc: A global provider of Threat Management Solutions. Download our HomeAdmin security software for free today! http://www.demarc.com/Info/Sentarus/hamr30 _______________________________________________ Nant-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nant-users
