[ Here's a note from Matt Guzowski on timing in Java. As for helping others,
go ahead. Feel free to post anything that may be of general interest here
on the list. -- David ]
-------- Original Message --------
Subject: Re: [Fwd: Fwd: Votey Checkers]
Date: Sun, 15 Feb 2004 00:42:10 -0500
From: Matthew Guzowski <[log in to unmask]>
I'm not sure if it's legal to help other people, but here's some info on
timing in Java that someone was intersted in:
A simple way to measure time in Java:
// Creates a new Date object using current time.
Date dtNow = new Date();
// Store the current time in milliseconds.
long lStart = dtNow.getTime();
* Do something here you want to time...
// Create another new Date.
Date dtEnd = new Date();
// Compute difference in milliseconds.
long lRunTime = dtEnd.getTime() - lStart;
It's not perfect but it's fairly accurate. Feel free to forward this
message to the CSSA list if it's legal to give information like this.