add clock in java as helper