title: Does GarbageCollectorMXBean#getCollectionTime() indicate time JVM was *paused* for GC?
body: <p>The documentation on <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/management/GarbageCollectorMXBean.html#getCollectionTime--" rel="nofollow noreferrer"><code>GarbageCollectorMXBean.html#getCollectionTime()</code></a> is sparse.</p>
  <p>It says:</p>
  <blockquote>
  <p>Returns the approximate accumulated collection elapsed time in milliseconds. This method returns -1 if the collection elapsed time is undefined for this collector.</p>
  <p>The Java virtual machine implementation may use a high resolution timer to measure the elapsed time. This method may return the same value even if the collection count has been incremented if the collection elapsed time is very short.</p>
  </blockquote>
  <p>What I'm trying to understand is whether this &quot;accumulated collection elapsed time&quot; is real time that the JVM is paused during for (which is an easy to understand concept) or whether it means something vaguer.</p>