org.eclipse.jgit.util.time.MonotonicClock based on
System.currentTimeMillis.
| Modifier and Type | Field and Description |
|---|---|
| private static final AtomicLong |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private static long | |
| public ProposedTimestamp | propose()
Implements org. Obtain a timestamp close to "now". |
| before | back to summary |
|---|---|
| private static final AtomicLong before | |
| MonotonicSystemClock | back to summary |
|---|---|
| public MonotonicSystemClock() | |
| nowMicros | back to summary |
|---|---|
| private static long nowMicros() | |
| propose | back to summary |
|---|---|
| public ProposedTimestamp propose() Implements org. Doc from org. Obtain a timestamp close to "now". Proposed times are close to "now", but may not yet be certainly in the past. This allows the calling thread to interleave other useful work while waiting for the clock instance to create an assurance it will never in the future propose a time earlier than the returned time.
A hypothetical implementation could read the local system clock (managed
by NTP) and return that proposal, concurrently sending network messages
to closely collaborating peers in the same cluster to also ensure their
system clocks are ahead of this time. In such an implementation the
| |