Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 53771 Details for
Bug 164378
Intermittent: ACServer abends or console output lost at termination of profiled app
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
Java for test class used.
InOut.java (text/java), 2.29 KB, created by
Bob Duncan
on 2006-11-13 14:49:52 EST
(
hide
)
Description:
Java for test class used.
Filename:
MIME Type:
Creator:
Bob Duncan
Created:
2006-11-13 14:49:52 EST
Size:
2.29 KB
patch
obsolete
> >import java.io.BufferedReader; >import java.io.InputStreamReader; >import java.util.Date; > >/********************************************************************** > * Copyright (c) 2004 Hyades project. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Common Public License v1.0 > * which accompanies this distribution, and is available at > * http://www.eclipse.org/legal/cpl-v10.html > * > * Contributors: > * IBM - Initial API and implementation > **********************************************************************/ > >/** > * InOut test class. > * > * > * @author Praful Rajawat > * @author Paul E. Slauenwhite > * @version February 10, 2005 > */ >public class InOut { > > public static void main(String[] args) { > > InOut aInOut = new InOut(); > > Date strtDate = new Date(); > > System.out.println("Start timestamp = " + strtDate); > > //Read standard in, just as a way of pausing the exit: > try { > System.out.println("\nPlease enter a string : "); > BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); > String line = in.readLine(); > System.out.println("String read in:\n" + line); > } > catch (Exception e) {} > > aInOut.methodA(); > > //Read standard in, just as a way of pausing the exit: > try { > System.out.println("\nPlease enter another string : "); > BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); > String line = in.readLine(); > System.out.println("String 2 read in:\n" + line + "\n"); > } > catch (Exception e) {} > > Date endDate = new Date(); > > System.out.println("End timestamp = " + endDate); > > Float elapsedtime = new Float((endDate.getTime() - strtDate.getTime()) / 1000.0); > > System.out.println("elapsed time = " + elapsedtime + " sec"); > } > > public void methodA() { > > Date curdate = new Date(); > int count = 1; > > for (int counter = 0; counter < 10000; counter++) { > count = (counter * 3 + count); > } > > System.out.println("\nCurrent timestamp = " + curdate); > } >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 164378
:
53768
|
53769
|
53770
| 53771