How do you control game speed?

I can think of 2 ways:

  1. by system time. But it is affected by lagging.

  2. by counting ticks. Now I set 1 tick to 10ms. But this is not intuitive, maybe other problems.

how do you think about this question?