TrackStudio Enterprise 3.2
|
To get the time difference (in seconds) between two consecutive messages:
ArrayList messages = task.getMessages(); Collections.reverse(messages); java.util.Date oldDate = task.getSubmitdate().getTime(); long diff = 0; for(Iterator it = messages.iterator();it.hasNext();) { java.util.Date newDate = ((Calendar)it.next()).getTime(); diff = newDate.getTime() - oldDate.getTime(); oldDate = newDate; } return diff/1000;
Copyright (c) 2002-2006. All rights reserved.
|