Skip to content

Instantly share code, notes, and snippets.

@wido
Created April 12, 2018 11:42
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wido/6e0beb74a742080a3cdc1097c4f9322b to your computer and use it in GitHub Desktop.
Save wido/6e0beb74a742080a3cdc1097c4f9322b to your computer and use it in GitHub Desktop.
Python UNIX timestamp nanoseconds
# Get the current UNIX Timestamp in nanoseconds
#
# Author: Wido den Hollander <wido@widodh.nl>
import time
now = int(round(time.time() * 1000000000))
print(now)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment