code: public static long getTimeMicros() {
          // Use use a dedicated lock object rather than synchronizing on the method, which
          // would synchronize on the Utils.class object, which is too coarse-grained.
          synchronized (g_lastMicroLock) {
              // We use System.currentTimeMillis() * 1000 for compatibility with the CLI and
              // other tools. This makes our timestamps "milliseconds since the epoch".
              long newValue = System.currentTimeMillis() * 1000;
              if (newValue <= g_lastMicroValue) {
                  // Either two threads called us very quickly or the system clock was set
                  // back a little. Just return the last value allocated + 1. Eventually,
                  // the system clock will catch up.
                  newValue = g_lastMicroValue + 1;
              }
              g_lastMicroValue = newValue;
              return newValue;
          }
      }
docs: Get the current time in microseconds since the epoch. This method is synchronized
  and guarantees that each successive call, even by different threads, returns
  increasing values.
  
  @return  Current time in microseconds (though not necessarily with microsecond
  precision).