clock working with period input value