<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -83,7 +83,8 @@ public class TimingHook implements Hook {
   }
   
   /**
-   * Calculate the average of the timings, in milliseconds.
+   * Calculate the average of the timings, in milliseconds. This will take a
+   * read-lock.
    * @return The average time in milliseconds recorded by this TimingHook,
    * as a double.
    */
@@ -100,6 +101,11 @@ public class TimingHook implements Hook {
     return ms / connects;
   }
   
+  /**
+   * Return the sum of all recorded timings, in milliseconds. This will take a
+   * read-lock.
+   * @return The total amount of time recorded.
+   */
   public final long totalMs() {
     readLock.lock();
     try {
@@ -109,6 +115,11 @@ public class TimingHook implements Hook {
     }
   }
   
+  /**
+   * Return the number of timings recorded. That is, how many times the
+   * TimerHook has seen the end event. This will take a read-lock.
+   * @return The total number of timings recorded.
+   */
   public final int totalCounts() {
     readLock.lock();
     try {
@@ -118,6 +129,10 @@ public class TimingHook implements Hook {
     }
   }
   
+  /**
+   * Reset both the timer and the timings counter. This will not disrupt
+   * timings that are currently 'in-flight.' This will take a write-lock.
+   */
   public final void reset() {
     writeLock.lock();
     try {
@@ -128,6 +143,11 @@ public class TimingHook implements Hook {
     }
   }
   
+  /**
+   * Record the given time-span and add it to the total. Appropriate locks
+   * are held at this point, to ensure the invariants of the TimingHook.
+   * @param spanMs
+   */
   protected void recordTimeMillis(long spanMs) {
     totalTimeMs += spanMs;
   }</diff>
      <filename>src/main/java/net/nanopool/hooks/TimingHook.java</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>a38dd3b205fd6c812fdbc74b8a1a9674895323d4</id>
    </parent>
  </parents>
  <author>
    <name>Christian Vest Hansen</name>
    <email>karmazilla@gmail.com</email>
  </author>
  <url>http://github.com/karmazilla/nanopool/commit/4208ff7fe68c5dfe22d8ffb1ab17164dd7ce9c3c</url>
  <id>4208ff7fe68c5dfe22d8ffb1ab17164dd7ce9c3c</id>
  <committed-date>2009-10-20T23:41:17-07:00</committed-date>
  <authored-date>2009-10-20T23:41:17-07:00</authored-date>
  <message>complete the javadoc for the TimingHook - this completes the javadoc for all things public in src/main/java</message>
  <tree>49bb2c015ccfc17070dd437a14e040a5a013c8a0</tree>
  <committer>
    <name>Christian Vest Hansen</name>
    <email>karmazilla@gmail.com</email>
  </committer>
</commit>
