ART-973 - Make Variable period counter faster by implementing in Java