Total members 11895 |It is currently Sun Dec 22, 2024 2:18 am Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

R Scripts

Weka





Code:
import java.util.*;

public class 
CalculateProcessTime{
  public static 
void main(String[] args){
    
int repeat 2000;
    
double[] ds = {Double.MAX_VALUE, -3.14e-200DDouble.NEGATIVE_INFINITY567.89023D,
123e199D, -0.000456D, -1.234D1e55D};
    
long[] ls = {2283911683699007717L, -8007630872066909262L4536503365853551745L,
548519563869L45LLong.MAX_VALUE1L, -9999L7661314123L0L};
    
long time;
    
StringBuffer s = new StringBuffer();
    
Hashtable<Object,Object= new Hashtable<Object,Object>();
    
System.out.println("Starting test");
    
time System.currentTimeMillis();
    for(
int i repeat0i--){
      
s.setLength(0);
      for(
int j ds.length-1>= 0j--){
        
s.append(ds[j]);
        
h.put(new Double(ds[j]), Boolean.TRUE);
      }
      for(
int j ls.length-1>= 0j--){
        
s.append(ls[j]);
        
h.put(new Long(ls[j]), Boolean.FALSE);
      }
    }
    
time System.currentTimeMillis() - time;
    
System.out.println(" The test took " time " milliseconds");
  }


calculate the process time of the completion of the operation through the Java program. In this section, an example with the complete code of the program is given for the best illustration of the procedure of calculating the process time in which any type of operation is completed after whole processing.
8)



_________________
M. S. Rakha, Ph.D.
Queen's University
Canada


Author:
Mastermind
User avatar Posts: 2715
Have thanks: 74 time
Post new topic Reply to topic  [ 1 post ] 

  Related Posts  to : Calculate process time
 calculate the load time for a page     -  
 process we can used complete and uncomplete method     -  
 code for FIFO schedualing process     -  
 Calculate score of the student     -  
 How to Calculate Volume of a Rectangle     -  
 Calculate euclidean distances     -  
 Calculate the sum of values in an array     -  
 calculate speed of a car in javaCV     -  
 calculate sum of many text inputs in javascript     -  
 calculate data from multiple selection     -  



Topic Tags

Java Time
cron





Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com