How can I create two independent timer

I want to create two independent timer. That is, they are controlled by two code snippets, but are shown simultaneously. How can I do this? Should I use multiprocessing? And how to use it?

Welcome to the forum!

It depends what you want to do with the timers. If you want to simply show a timer multiple times, then the easiest option is to use a javascript. If you want to interact with the value in your python code, that becomes more complicated due to the streamlit execution model.

Here is an example with some html, JS and CSS copied from Build a Countdown Timer in Just 18 Lines of JavaScript — SitePoint