summaryrefslogtreecommitdiff
path: root/src/io/Response.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/io/Response.java')
-rw-r--r--src/io/Response.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/io/Response.java b/src/io/Response.java
index 92b0f0c..e5ede8a 100644
--- a/src/io/Response.java
+++ b/src/io/Response.java
@@ -39,4 +39,12 @@ public class Response {
public int getRateLimitReset() {
return this.rateLimitReset;
}
+
+ /**
+ * @return Time in milliseconds that should be waited for before a new
+ * similar request can be executed.
+ */
+ public long getRateLimitRemainingTime() {
+ return rateLimitReset * 1000 - System.currentTimeMillis();
+ }
}