public long getResetMillis(RateBucketPeriod period) {
        long now = System.currentTimeMillis();
        long periodBoundary = getPeriodBoundary(now, period);
        return periodBoundary - now;
    }
Returns the number of millis until the period resets.
@param period the period
@return millis until period resets
gateway/engine/core/src/main/java/io/apiman/gateway/engine/rates/RateLimiterBucket.java