Python count seconds

By SlashReal | Coding_tuts | 5 Apr 2023


import time

counter = 0

while 0 < 1:

    seconds = time.time()

    local_time = time.ctime(seconds)

    counter = counter +1

    print('Seconds: ' , counter)

    time.sleep(1)

How do you rate this article?

0



Coding_tuts
Coding_tuts

Programming tutorials

Send a $0.01 microtip in crypto to the author, and earn yourself as you read!

20% to author / 80% to me.
We pay the tips from our rewards pool.