Update of /cvsroot/webmacro/webmacro/src/org/webmacro/util
In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv20288/src/org/webmacro/util
Modified Files:
Clock.java
Log Message:
Checkstyle: utility classes should not have default constructors
Index: Clock.java
===================================================================
RCS file: /cvsroot/webmacro/webmacro/src/org/webmacro/util/Clock.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** Clock.java 16 Jul 2003 06:45:00 -0000 1.6
--- Clock.java 19 Mar 2008 20:08:05 -0000 1.7
***************
*** 29,32 ****
--- 29,33 ----
* This is an optimization. "System.currentTimeMillis()" is a relatively
* slow method, and "new Date()" is an incredibly expensive operation.
+ *
* Update: System.ctm is no longer all that slow; replaced with a version
* that caches the Date but not the time.
***************
*** 35,45 ****
{
/**
! * Every tick interval the following variable is updated with the current system time
*/
static public long TIME = System.currentTimeMillis();
/**
! * Date information
*/
private static Date date = new Date();
--- 36,51 ----
{
+ /** Disallow instantiation. */
+ private Clock()
+ {
+ }
+
/**
! * Every tick interval the following variable is updated with the current system time.
*/
static public long TIME = System.currentTimeMillis();
/**
! * Date information.
*/
private static Date date = new Date();
|