clock factory
lastTs is really just previous state