avoid using clock to measure time.