Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f90b11e

Browse filesBrowse files
committed
1
1 parent 54ce559 commit f90b11e
Copy full SHA for f90b11e

File tree

Expand file treeCollapse file tree

24 files changed

+246
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

24 files changed

+246
-0
lines changed
Open diff view settings
Collapse file
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Wake up...
2+
Timer has schedule the reminderTimerTask...
Collapse file
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="src" path="src"/>
4+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
5+
<classpathentry kind="output" path="bin"/>
6+
</classpath>
Collapse file
+17Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>TimerDemo</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.jdt.core.javabuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
</buildSpec>
14+
<natures>
15+
<nature>org.eclipse.jdt.core.javanature</nature>
16+
</natures>
17+
</projectDescription>
Collapse file
+11Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
eclipse.preferences.version=1
2+
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3+
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
4+
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
5+
org.eclipse.jdt.core.compiler.compliance=1.8
6+
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
7+
org.eclipse.jdt.core.compiler.debug.localVariable=generate
8+
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
9+
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
10+
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
11+
org.eclipse.jdt.core.compiler.source=1.8
Binary file not shown.
Collapse file
949 Bytes
Binary file not shown.
Collapse file
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import java.util.TimerTask;
2+
3+
public class ReminderTimerTask extends TimerTask
4+
{
5+
public void run()
6+
{
7+
System.out.println("Wake up...");
8+
}
9+
}
Collapse file
+32Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import java.util.Date;
2+
import java.util.Timer;
3+
import java.util.TimerTask;
4+
5+
public class TimerDemo
6+
{
7+
public static void main(String[] args) throws InterruptedException
8+
{
9+
10+
/*
11+
*
12+
* Creates a new timer whose associated thread has the
13+
* specified name, and may be specified to run as a daemon.
14+
*
15+
* Parameters:
16+
*
17+
* name - the name of the associated thread
18+
*
19+
* isDaemon - true if the associated thread should run as a
20+
* daemon
21+
*
22+
*/
23+
Timer timer = new Timer("Reminder Timer", true);
24+
25+
TimerTask reminderTimerTask = new ReminderTimerTask();
26+
27+
timer.schedule(reminderTimerTask, new Date());
28+
System.out.println("Timer has schedule the reminderTimerTask...");
29+
30+
}
31+
32+
}
Collapse file
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Timer has schedule the reminderTimerTask...
2+
scheduledExecutionTime = Sat Feb 02 09:18:20 IST 2019
3+
Wake up...
4+
Wake up...
5+
Wake up...
6+
Wake up...
7+
Wake up...
Collapse file
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="src" path="src"/>
4+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
5+
<classpathentry kind="output" path="bin"/>
6+
</classpath>

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.