aboutsummaryrefslogtreecommitdiffstats
path: root/ui/ie.js
blob: 1ce6a8450d575c196979dd2fa996beb93894385d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
( function( factory ) {
	if ( typeof define === "function" && define.amd ) {

		// AMD. Register as an anonymous module.
		define( [ "jquery", "./version" ], factory );
	} else {

		// Browser globals
		factory( jQuery );
	}
} ( function( $ ) {

// This file is deprecated
return $.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() );
} ) );
class="cm">/* * Copyright (C) 2016, Google Inc. and others * * This program and the accompanying materials are made available under the * terms of the Eclipse Distribution License v. 1.0 which is available at * https://www.eclipse.org/org/documents/edl-v10.php. * * SPDX-License-Identifier: BSD-3-Clause */ package org.eclipse.jgit.junit.time; import java.time.Duration; import java.util.concurrent.TimeUnit; import org.eclipse.jgit.util.time.MonotonicClock; import org.eclipse.jgit.util.time.ProposedTimestamp; /** * Fake {@link org.eclipse.jgit.util.time.MonotonicClock} for testing code that * uses Clock. * * @since 4.6 */ public class MonotonicFakeClock implements MonotonicClock { private long now = TimeUnit.SECONDS.toMicros(42); /** * Advance the time returned by future calls to {@link #propose()}. * * @param add * amount of time to add; must be {@code > 0}. * @param unit * unit of {@code add}. */ public void tick(long add, TimeUnit unit) { if (add <= 0) { throw new IllegalArgumentException(); } now += unit.toMillis(add); } @Override public ProposedTimestamp propose() { long t = now++; return new ProposedTimestamp() { @Override public long read(TimeUnit unit) { return unit.convert(t, TimeUnit.MILLISECONDS); } @Override public void blockUntil(Duration maxWait) { // Nothing to do, since fake time does not go backwards. } }; } }