class Timeout {

    private final long expiresMs;

    public Timeout(long timeout, TimeUnit timeUnit) {
        this.expiresMs = System.currentTimeMillis() + timeUnit.toMillis(timeout);
    }

    public boolean isExpired() {
        return expiresMs < System.currentTimeMillis();
    }

    public long remaining() {<FILL_FUNCTION_BODY>}

}


        long diff = expiresMs - System.currentTimeMillis();
        if (diff > 0) {
            return diff;
        }
        return 0;
    
<no_super_class>