What is a Tick in python?


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

Updated on: 19-Feb-2020

1K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements