More sophisticated clock library