From 0e078326714206abbecc185d53821e3ed5cb2236 Mon Sep 17 00:00:00 2001
From: ?? ? <ulysseskao@ximple.com.tw>
Date: Tue, 10 Jun 2008 12:44:13 +0800
Subject: [PATCH] update for EOFM-115

---
 xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/OracleConvertDgn2MySQLJob.java |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/OracleConvertDgn2MySQLJob.java b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/OracleConvertDgn2MySQLJob.java
index ade54b4..2ed8406 100644
--- a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/OracleConvertDgn2MySQLJob.java
+++ b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/OracleConvertDgn2MySQLJob.java
@@ -201,8 +201,7 @@
             throw new JobExecutionException("Cannot connect source postgreSQL database.");
         }
 
-        Calendar cal = Calendar.getInstance();
-        Date startTime = cal.getTime();
+        long t1 = System.currentTimeMillis();
         try
         {
             logger.info("-- step:clearOutputDatabase --");
@@ -255,11 +254,10 @@
             }
 
             disconnect();
-            Date endTime = cal.getTime();
-            Date time = new Date(endTime.getTime() - startTime.getTime());
+            long t2 = System.currentTimeMillis();
             // public static final String DATE_FORMAT_NOW = "yyyy-MM-dd HH:mm:ss";
             // SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT_NOW);
-            logger.warn("use time = " + time);
+            logger.warn("use time = " + ((t2 - t1) / 60000.0) + " min");
         } catch (SQLException e)
         {
             logger.warn(e.getMessage(), e);

--
Gitblit v0.0.0-SNAPSHOT