Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 299 for nanoSeconds (0.22 sec)

  1. src/cmd/vendor/golang.org/x/sys/unix/timestruct.go

    }
    
    // Unix returns the time stored in ts as seconds plus nanoseconds.
    func (ts *Timespec) Unix() (sec int64, nsec int64) {
    	return int64(ts.Sec), int64(ts.Nsec)
    }
    
    // Unix returns the time stored in tv as seconds plus nanoseconds.
    func (tv *Timeval) Unix() (sec int64, nsec int64) {
    	return int64(tv.Sec), int64(tv.Usec) * 1000
    }
    
    // Nano returns the time stored in ts as nanoseconds.
    func (ts *Timespec) Nano() int64 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:33 UTC 2023
    - 2.2K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/base/StopwatchTest.java

        assertEquals(0, stopwatch.elapsed(NANOSECONDS));
        stopwatch.start();
        ticker.advance(3);
        assertEquals(3, stopwatch.elapsed(NANOSECONDS));
      }
    
      public void testReset_whileRunning() {
        ticker.advance(1);
        stopwatch.start();
        assertEquals(0, stopwatch.elapsed(NANOSECONDS));
        ticker.advance(2);
        assertEquals(2, stopwatch.elapsed(NANOSECONDS));
        stopwatch.reset();
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Fri Feb 09 15:49:48 UTC 2024
    - 5.8K bytes
    - Viewed (0)
  3. guava/src/com/google/common/util/concurrent/Uninterruptibles.java

     */
    
    package com.google.common.util.concurrent;
    
    import static com.google.common.base.Verify.verify;
    import static com.google.common.util.concurrent.Internal.toNanosSaturated;
    import static java.util.concurrent.TimeUnit.NANOSECONDS;
    
    import com.google.common.annotations.GwtCompatible;
    import com.google.common.annotations.GwtIncompatible;
    import com.google.common.annotations.J2ktIncompatible;
    import com.google.common.base.Preconditions;
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue Apr 04 09:45:04 UTC 2023
    - 18.7K bytes
    - Viewed (0)
  4. src/syscall/timestruct.go

    // license that can be found in the LICENSE file.
    
    //go:build unix || (js && wasm) || wasip1
    
    package syscall
    
    // TimespecToNsec returns the time stored in ts as nanoseconds.
    func TimespecToNsec(ts Timespec) int64 { return ts.Nano() }
    
    // NsecToTimespec converts a number of nanoseconds into a [Timespec].
    func NsecToTimespec(nsec int64) Timespec {
    	sec := nsec / 1e9
    	nsec = nsec % 1e9
    	if nsec < 0 {
    		nsec += 1e9
    		sec--
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 21:03:59 UTC 2024
    - 958 bytes
    - Viewed (0)
  5. guava/src/com/google/common/base/Stopwatch.java

          return MINUTES;
        }
        if (SECONDS.convert(nanos, NANOSECONDS) > 0) {
          return SECONDS;
        }
        if (MILLISECONDS.convert(nanos, NANOSECONDS) > 0) {
          return MILLISECONDS;
        }
        if (MICROSECONDS.convert(nanos, NANOSECONDS) > 0) {
          return MICROSECONDS;
        }
        return NANOSECONDS;
      }
    
      private static String abbreviate(TimeUnit unit) {
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Thu Feb 23 15:09:35 UTC 2023
    - 9.2K bytes
    - Viewed (0)
  6. guava-testlib/test/com/google/common/testing/FakeTickerTest.java

        FakeTicker ticker = new FakeTicker();
        assertSame(ticker, ticker.setAutoIncrementStep(10, TimeUnit.NANOSECONDS));
      }
    
      public void testAutoIncrementStep_nanos() {
        FakeTicker ticker = new FakeTicker().setAutoIncrementStep(10, TimeUnit.NANOSECONDS);
        assertEquals(0, ticker.read());
        assertEquals(10, ticker.read());
        assertEquals(20, ticker.read());
      }
    
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue Feb 06 14:40:46 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/base/Stopwatch.java

          return MINUTES;
        }
        if (SECONDS.convert(nanos, NANOSECONDS) > 0) {
          return SECONDS;
        }
        if (MILLISECONDS.convert(nanos, NANOSECONDS) > 0) {
          return MILLISECONDS;
        }
        if (MICROSECONDS.convert(nanos, NANOSECONDS) > 0) {
          return MICROSECONDS;
        }
        return NANOSECONDS;
      }
    
      private static String abbreviate(TimeUnit unit) {
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue Nov 15 21:38:09 UTC 2022
    - 8.5K bytes
    - Viewed (0)
  8. subprojects/core/src/test/groovy/org/gradle/internal/typeconversion/TimeUnitsParserTest.groovy

            unit.timeUnit == parsed
    
            where:
            value           |input          |parsed         | normalizedValue
            10              |'nanoseconds'  |NANOSECONDS    |10
            20              |'mILLISECONds' |MILLISECONDS   |20
            1               |'days'         |MILLISECONDS   |1 * 24 * 60 * 60 * 1000
            2               |'hours'        |MILLISECONDS   |2 * 60 * 60 * 1000
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Nov 11 02:41:37 UTC 2013
    - 1.7K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/util/concurrent/Uninterruptibles.java

     * the License.
     */
    
    package com.google.common.util.concurrent;
    
    import static com.google.common.base.Verify.verify;
    import static java.util.concurrent.TimeUnit.NANOSECONDS;
    
    import com.google.common.annotations.GwtCompatible;
    import com.google.common.annotations.GwtIncompatible;
    import com.google.common.annotations.J2ktIncompatible;
    import com.google.common.base.Preconditions;
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue Apr 04 09:45:04 UTC 2023
    - 14.4K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/util/concurrent/MoreExecutorsTest.java

            hook.start();
          }
          for (Thread hook : hooks) {
            hook.join();
          }
        }
      }
    
      /* Half of a 1-second timeout in nanoseconds */
      private static final long HALF_SECOND_NANOS = NANOSECONDS.convert(1L, SECONDS) / 2;
    
      public void testShutdownAndAwaitTermination_immediateShutdown() throws Exception {
        ExecutorService service = Executors.newSingleThreadExecutor();
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 28.2K bytes
    - Viewed (0)
Back to top