- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 49 for SetTime (0.25 sec)
-
platforms/core-runtime/time/src/test/groovy/org/gradle/internal/time/DefaultTimerTest.groovy
when: setTime(51243) then: timer.getElapsed() == "51.243 secs" } def testOnlySecondsEvenMs() { when: setTime(4000) then: timer.getElapsed() == "4.0 secs" } def testMinutesAndSeconds() { when: setTime(0, 32, 40, 322) then:
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Thu Apr 11 20:20:17 UTC 2024 - 2.2K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/util/flowcontrol/request/object_count_tracker_test.go
} now := time.Now() fakeClock.SetTime(now.Add(-61 * time.Minute)) tracker.Set("k1", 61) fakeClock.SetTime(now.Add(-60 * time.Minute)) tracker.Set("k2", 60) // we are going to prune keys that are stale for >= 1h // so the above keys are expected to be pruned and the // key below should not be pruned. mostRecent := now.Add(-59 * time.Minute) fakeClock.SetTime(mostRecent) tracker.Set("k3", 59)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Sep 17 19:36:14 UTC 2021 - 3.4K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/testing/eventclock/fake_event_clock_test.go
func exerciseSettablePassiveClock(t *testing.T, pc TestableEventClock) { t1 := time.Now() t2 := t1.Add(time.Hour) pc.SetTime(t1) tx := pc.Now() if tx != t1 { t.Errorf("SetTime(%#+v); Now() => %#+v", t1, tx) } dx := pc.Since(t1) if dx != 0 { t.Errorf("Since() => %v", dx) } pc.SetTime(t2) dx = pc.Since(t1) if dx != time.Hour { t.Errorf("Since() => %v", dx) } tx = pc.Now()
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat Aug 07 04:07:31 UTC 2021 - 3.2K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/storage/cacher/time_budget_test.go
// wait for longer than the maxBudget nextTime := time.Now().Add(10 * time.Second) fakeClock.SetTime(nextTime) if res := budget.takeAvailable(); res != budget.maxBudget { t.Errorf("Expected: %v, got: %v", budget.maxBudget, res) } // add two refresh intervals to accumulate 2*refresh durations nextTime = nextTime.Add(2 * time.Second) fakeClock.SetTime(nextTime) if res := budget.takeAvailable(); res != 2*budget.refresh {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Sep 15 09:52:18 UTC 2021 - 2.8K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/testing/eventclock/fake.go
if !ok || limit != nil && t.After(*limit) { break } fec.SetTime(t) } } // SetTime sets the time and runs to completion all events that should // be started by the given time --- including any further events they // schedule func (fec *Fake) SetTime(t time.Time) { fec.FakePassiveClock.SetTime(t) for { foundSome := false func() { fec.waitersLock.Lock()
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sun Dec 18 04:27:38 UTC 2022 - 7.9K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/util/flowcontrol/metrics/timing_ratio_histogram_test.go
ddt := time.Duration(rand.Intn(ddtRangeCentiPeriods)-ddtOffsetCentiPeriods) * steppingPeriod / 100 t1 = t1.Add(ddt) diff := t1.Sub(t0) if diff > dt { dt = diff } clk.SetTime(t1) tro.Set(1) expectedCount := int64(dt / samplingPeriod) actualCount, err := getHistogramCount(registry, histogramName) if err != nil && !(err == errMetricNotFound && expectedCount == 0) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Jul 13 16:03:06 UTC 2022 - 8.7K bytes - Viewed (0) -
platforms/core-runtime/launcher/src/main/java/org/gradle/launcher/daemon/registry/DaemonStopEvent.java
} if (o == null || getClass() != o.getClass()) { return false; } DaemonStopEvent stopEvent = (DaemonStopEvent) o; return timestamp.getTime() == stopEvent.timestamp.getTime() && (reason != null ? reason.equals(stopEvent.reason) : stopEvent.reason == null); } @Override public int hashCode() { int result = timestamp.hashCode();
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Wed May 29 06:47:38 UTC 2024 - 4.1K bytes - Viewed (0) -
subprojects/core/src/main/java/org/gradle/api/internal/file/archive/ZipCopyAction.java
private void visitFile(FileCopyDetails fileDetails) { try { ZipArchiveEntry archiveEntry = new ZipArchiveEntry(fileDetails.getRelativePath().getPathString()); archiveEntry.setTime(getArchiveTimeFor(fileDetails)); archiveEntry.setUnixMode(UnixStat.FILE_FLAG | fileDetails.getPermissions().toUnixNumeric()); zipOutStr.putArchiveEntry(archiveEntry);
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Wed Nov 08 14:16:53 UTC 2023 - 6.6K bytes - Viewed (0) -
subprojects/core/src/testFixtures/groovy/org/gradle/util/JarUtils.groovy
def jarOut = new JarOutputStream(out) try { contents.each { file, fileContents -> def zipEntry = new ZipEntry(file) zipEntry.setTime(0) jarOut.putNextEntry(zipEntry) jarOut << fileContents } } finally { jarOut.close() } return out.toByteArray() }
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Mon Aug 07 19:17:11 UTC 2023 - 6.4K bytes - Viewed (0) -
src/cmd/distpack/archive.go
if err != nil { log.Fatalf("archive remove: %v", err) } if match { return false } } return true }) } // SetTime sets the modification time of all files in the archive to t. func (a *Archive) SetTime(t time.Time) { for i := range a.Files { a.Files[i].Time = t } } // RenameGoMod renames the go.mod files in the archive to _go.mod,
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Aug 11 17:37:52 UTC 2023 - 5.9K bytes - Viewed (0)