Maxtime of 0 will keep state running forever