🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #17111

Re: Elapsed seconds technique

#17111
From: William Yu
Date: Tue, 22 Dec 1998 00:00
17 lines
959 bytes

Kent Mestayer wrote:
> 
> Can anyone share with me a method for determining the seconds, minutes, etc
> difference between two dates?
> Santa will be good to you

Date a = new Date();
try {
  Thread.sleep(1000);
} catch (Exception e) { }
Date b = new Date();
System.out.println(""+b.getTime() - a.getTime());

Many more methods available from looking through the Date and Calendar
classes.
Technical Details
Message-ID: <367FF48A.3109A14E@Bigfoot.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <75cfq9$r91@forums.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,12e1a5ce2e3b7ace
X-Google-Attributes: gidf74b3,public
From: William Yu <William_Yu@Bigfoot.com>
Subject: Re: Elapsed seconds technique
Date: 1998/12/22
Message-ID: <367FF48A.3109A14E@Bigfoot.com>
X-Deja-AN: 424935468
Content-Transfer-Encoding: 7bit
References: <75cfq9$r91@forums.borland.com>
X-Accept-Language: en
Content-Type: text/plain; charset=us-ascii
Organization: American All-Risk Group (AARG)
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.language