m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/pl/edu/mimuw/cloudatlas/model/ValueUtils.java
diff options
context:
space:
mode:
authorMartin <marcin.j.chrzanowski@gmail.com>2020-01-12 16:54:19 +0100
committerGitHub <noreply@github.com>2020-01-12 16:54:19 +0100
commitf0076abd246bdf40ba4a03c0c894f6f75173eac8 (patch)
treedb9cac13dae0da577c63dfd9a368452be6c14f2a /src/main/java/pl/edu/mimuw/cloudatlas/model/ValueUtils.java
parentd88caa2d3fdb3cc5d17a4367583e8ab385ead3b6 (diff)
parentedec7f92b20f1f873083bdf3198283fa822e0f64 (diff)
Merge pull request #112 from m-chrzan/gossip-gc
Garbage collect inactive gossips
Diffstat (limited to 'src/main/java/pl/edu/mimuw/cloudatlas/model/ValueUtils.java')
-rw-r--r--src/main/java/pl/edu/mimuw/cloudatlas/model/ValueUtils.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/java/pl/edu/mimuw/cloudatlas/model/ValueUtils.java b/src/main/java/pl/edu/mimuw/cloudatlas/model/ValueUtils.java
index 3df8231..866349f 100644
--- a/src/main/java/pl/edu/mimuw/cloudatlas/model/ValueUtils.java
+++ b/src/main/java/pl/edu/mimuw/cloudatlas/model/ValueUtils.java
@@ -12,4 +12,8 @@ public class ValueUtils {
public static ValueTime currentTime() {
return new ValueTime(System.currentTimeMillis());
}
+
+ public static ValueTime addToTime(ValueTime time, long millis) {
+ return time.addValue(new ValueDuration(millis));
+ }
}