Brandon Defrancis пре 8 година
родитељ
комит
7c8b3cf930
2 измењених фајлова са 1 додато и 0 уклоњено
  1. BIN
      .DS_Store
  2. 1
    0
      BDefrancis.md

+ 1
- 0
BDefrancis.md Прегледај датотеку

@@ -0,0 +1 @@
1
+So I chose to write a short summary on Stopwatch.java. What this code sample does is it starts a timer and stops it on command and returns how many seconds have passed. How this works is by using the .nanoTime() method in java to start and stop the timer. Then in order to return the time in seconds it calls on a method returning ( stopTime - startTime ) / NANOS_PER_SEC; "NANOS_PER_SEC", being a variable with a value of 1000000000.0 which is how many nano seconds are in a second. Finally returning a statement with how many seconds are tracked. There is also a long calling a method to return how many nano seconds were tracked.