tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Channing Benson <cben...@vmware.com>
Subject getCurrentTimeMillis definition in JDBCAccessValve
Date Mon, 02 Aug 2010 22:12:08 GMT
Hi,

What am I missing here?

In JDBCAccessValve, the method getCurrentTimeMillis is defined as

    public long getCurrentTimeMillis() {
        long systime  =  System.currentTimeMillis();
        if ((systime - currentTimeMillis) > 1000) {
            currentTimeMillis  =  new java.util.Date(systime).getTime();
        }
        return currentTimeMillis;
    }

I can figure out that this method artificially dials down the resolution of the recorded time,
but to what end? Why not just use System.currentTimeMillis() directly?

Any edification is appreciated.

-- Chan

Channing Benson
SpringSource, a division of VMware
cbenson@vmware.com
W: 610-328-3691
Mobile: 610-909-7349



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message