What is a Tick in python?

PythonServer Side ProgrammingProgramming

The floating-point numbers in units of seconds for time interval are indicated by Tick in python. Particular instants in time are expressed in seconds since 12:00am, January 1, 1970(epoch). You can use the time module to use functions for working with times, and for converting between representations. For example, if you want to print the current time in ticks, you'd write:

Example

import time
ticks = time.time()
print("Ticks since 12:00am, January 1, 1970: ", ticks)

Output

This will give the output −

Ticks since 12:00 am, January 1, 1970:  1514482031.2905385
raja
Published on 05-Jan-2018 13:16:38
Advertisements