Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Libfaketime | 2,258 | 1 | a month ago | 1 | February 27, 2018 | 17 | gpl-2.0 | C | ||
libfaketime modifies the system time for a single application | ||||||||||
Elevenclock | 1,876 | 17 hours ago | 5 | gpl-3.0 | Python | |||||
ElevenClock: Customize Windows 11 taskbar clock | ||||||||||
Truetime Android | 1,304 | a day ago | 35 | apache-2.0 | Kotlin | |||||
Android NTP time library. Get the true current time impervious to device clock time changes | ||||||||||
Time | 1,000 | a year ago | 76 | C++ | ||||||
Time library for Arduino | ||||||||||
Link | 924 | 3 months ago | 19 | other | C++ | |||||
Ableton Link | ||||||||||
Clock | 616 | 135 | 531 | a month ago | 15 | November 15, 2021 | 11 | mit | Go | |
Clock is a small library for mocking time in Go. | ||||||||||
Node Microtime | 565 | 4,077 | 664 | 8 months ago | 39 | June 09, 2022 | 1 | mit | C++ | |
Get the current time in microseconds | ||||||||||
Bemanalogclock | 488 | 11 | 6 years ago | 7 | April 28, 2016 | 2 | mit | Objective-C | ||
iOS library to create elegant, interactive clocks. | ||||||||||
React Datetime Picker | 463 | 92 | 41 | 18 hours ago | 48 | September 19, 2022 | 9 | mit | JavaScript | |
A datetime picker for your React app. | ||||||||||
Literature Clock | 444 | 19 days ago | 3 | other | R | |||||
Clock using time quotes from the literature, based on the work of Jaap Meijers |
This library lets you create virtual-time clocks and install them as the JVM's clock to help with testing.
A virtual-time Clock
will modify the operation of
System.currentTimeMillis()
, System.nanoTime()
, Thread.sleep
, Object.wait(long)
, LockSupport.parkNanos
and any other operation relying on timeouts.
Use this library to slow-down/speed-up/manually control the JVM's clock to make your timing-sensitive tests less flaky.
Early days.
We've begun using TimeWarp's ScaledClock
(and SystemClock
) in Quasar tests.
ManualClock
hasn't been tested, so it probably doesn't work yet.
Clone and build the repository with ./gradlew
or use Maven artifact co.paralleluniverse:timewarp:0.1.0-SNAPSHOT
from the Sonatype snapshot repository (https://oss.sonatype.org/content/repositories/snapshots
)
Add the JAR file to your bootstrap classpath with -Xbootclasspath/a:[timewarp jar]
and as an agent
with -javaagent:[timewarp jar]
Install one of the provided clocks, SystemClock
, ScaledClock
, or ManualClock
, using the VirtualClock
class.
Please consult the Javadocs for detailed information.
Alternatively, you can pass an integer as a command-line argument to the agent (e.g. -javaagent:[timewarp jar]=3
),
which would install a global scaling clock, that would slow down the system clock by a factor equal to the parameter.
So an argument of 3 would install a ScaledClock
with a scaling factor of 0.33333
.
MIT
Copyright (c) 2015-2016, Parallel Universe Software Co. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.