long thetime=System.currentTimeMillis();

when it comes to performance ,you don't want to create unnecessary objects

should be the best way to access system time




 

----Original Message Follows----
From: Shawn Zhu <[EMAIL PROTECTED]>
Reply-To: A mailing list about Java Server Pages specification and reference <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: Re: important ..................
Date: Tue, 15 May 2001 11:39:13 -0700
MIME-Version: 1.0
Received: from [204.160.241.38] by hotmail.com (3.2) with ESMTP id MHotMailBCCAC0CB00274004315FCCA0F126F85E0; Tue May 15 11:30:43 2001
Received: from mail (mail.javasoft.com [204.160.241.28])by mail2.java.sun.com (8.10.0.Beta13+Sun/8.10.0.Beta13) with ESMTP id f4FIV2I15063;Tue, 15 May 2001 11:31:02 -0700 (PDT)
Received: from JAVA.SUN.COM by JAVA.SUN.COM (LISTSERV-TCP/IP release 1.8d) with spool id 100756 for [EMAIL PROTECTED]; Tue, 15 May 2001 11:31:39 -0700
Received: from exchng.medem.com (66-2-112-44.customer.algx.net [66.2.112.44]) by mail.java.sun.com (8.10.0.Beta13+Sun/8.10.2) with ESMTP id f4FIV0k07296 for <[EMAIL PROTECTED]>; Tue, 15 May 2001 11:31:00 -0700 (PDT)
Received: by EXCHNG with Internet Mail Service (5.5.2653.19) id ; Tue, 15 May 2001 11:39:13 -0700
From [EMAIL PROTECTED] Tue May 15 11:31:32 2001
X-Mailer: Internet Mail Service (5.5.2653.19)
Message-ID: <2FB5C64872A7D311BFB4009027CCC78E0119EF31@EXCHNG>
Sender: A mailing list about Java Server Pages specification and reference <[EMAIL PROTECTED]>
How come when calling in a similar fashion to
long gmtTime = gmtCalendar.getTimeInMillis();
the compiler complains that
==============
TestCases/dataBase/DBManager.java [441:1] getTimeInMillis() has protected
access in java.util.Calendar
long tRightNow = c.getTimeInMillis();
^
1 error
> -----Original Message-----
> From: Daryani Santosh [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, May 15, 2001 10:19 AM
> To: [EMAIL PROTECTED]
> Subject: Re: important ..................
>
>
> Is this what you are looking for?
>
> TimeZone gmtz = TimeZone.getTimeZone("GMT");
> Calendar gmtCalendar = Calendar.getInstance(gmtz);
>
> long gmtTime = gmtCalendar.getTimeInMillis() ;
>
>
> If the time zone you want is not represented by one of the
> supported IDs, then
> you can create a custom time zone ID
> with the following syntax:
>
> GMT[+|-]hh[[:]mm]
>
>
>
> Santosh
>
>
>
>
>
>
> sandarbh <[EMAIL PROTECTED]>on 05/15/2001 12:57:20 PM
>
> Please respond to A mailing list about Java Server Pages
> specification and
> reference <[EMAIL PROTECTED]>
>
> To: [EMAIL PROTECTED]
> cc: (bcc: Santosh Daryani/IT/Aon Consulting)
>
> Subject: Re: important ..................
>
>
>
> this will give me current time in milliseconds. can we try
> getting this
> value for some other time in GMT format
>
> sandarbh
> ----- Original Message -----
> From: "Clayton Nash" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, May 15, 2001 5:19 PM
> Subject: Re: important ..................
>
>
> > just try
> > long thetime=System.currentTimeMillis();
> >
> > Clayton
> >
> > -----Original Message-----
> > From: A mailing list about Java Server Pages specification
> and reference
> > [mailto:[EMAIL PROTECTED]]On Behalf Of sandarbh
> > Sent: 15 May 2001 13:49
> > To: [EMAIL PROTECTED]
> > Subject: important ..................
> >
> >
> > Hi all,
> > I have a basic simple question to ask.
> > I need to know exact difference between two times in
> milliseconds in a
> bean
> > which i am callig thru a JSP page. If i use calender class
> and use compute
> > time then it is abstract in nature so i have to blah blah
> blah........u
> know
> >
> > The other option is -->>>>>>>>>>>>>>
> > select sysdate - (select max(logdatetime) from module_log)
> from dual, get
> > the result and proceed the .. the connection is already
> there so question
> is
> > only of creating resultset and blah blah.............
> >
> > which of these options will take less system resources and why??
> >
> > Sandarbh
> >
> >
> ==============================================================
> =============
> > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> > JSP-INTEREST".
> > For digest: mailto [EMAIL PROTECTED] with body: "set
> JSP-INTEREST
> > DIGEST".
> > Some relevant FAQs on JSP/Servlets can be found at:
> >
> > http://java.sun.com/products/jsp/faq.html
> > http://www.esperanto.org.nz/jsp/jspfaq.html
> > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
> >
> >
> ==============================================================
> =============
> > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> > For digest: mailto [EMAIL PROTECTED] with body: "set
> JSP-INTEREST
> DIGEST".
> > Some relevant FAQs on JSP/Servlets can be found at:
> >
> > http://java.sun.com/products/jsp/faq.html
> > http://www.esperanto.org.nz/jsp/jspfaq.html
> > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
> >
>
> ==============================================================
> =============
> To unsubscribe: mailto [EMAIL PROTECTED] with body:
> "signoff JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set
> JSP-INTEREST DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
> ==============================================================
> =============
> To unsubscribe: mailto [EMAIL PROTECTED] with body:
> "signoff JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set
> JSP-INTEREST DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets


Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

=========================================================================== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to