%@page import="java.util.Calendar"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ page import="java.util.Date" %>
<%@ page import="java.util.concurrent.*" %>
Insert title here
<%
String second = request.getParameter("second");
if (second == null )
{
second="1";
}
%>
|
 |
Sleep for ${second} second
|
<%
long start = System.currentTimeMillis();
Thread.sleep(Integer.parseInt(second)*1000);
int cnt=0;
int count=5;
while (true)
{
// double a=Math.random();
// double b=Math.random();
double a=ThreadLocalRandom.current().nextDouble();
double b=ThreadLocalRandom.current().nextDouble();
System.out.println(a);
System.out.println(b);
double c=a*b*a;
if (cnt==count)
break;
cnt++;
}
long end = System.currentTimeMillis();
long gap = (end-start);
%>
Call Success !!!!!
elapsed time = <%= gap %> ms
Copyright 2017 TTA All Rights Reserved (TTA 한국정보통신기술협회)