Skip to content

Commit ad7397f

Browse files
Stopwatch.java
1 parent ba42d26 commit ad7397f

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

Stopwatch.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
public class Stopwatch {
2+
public static void main(String[] args) {
3+
Thread t = new Thread(() -> {
4+
int sec = 0;
5+
try {
6+
while (true) {
7+
System.out.println("Seconds: " + sec++);
8+
Thread.sleep(1000);
9+
}
10+
} catch (Exception e) {}
11+
});
12+
13+
t.start();
14+
}
15+
}

0 commit comments

Comments
 (0)