3

I need to send a nanoseconds timestamp to influx db (1.2).

Maybe you could recommend the simple way in python 3.6 to convert current date time to nanoseconds timestamp ?

Thank you

saddayz
  • 41
  • 2
  • 5
  • 1
    Possible duplicate of [Get POSIX/Unix time in seconds and nanoseconds in Python?](https://stackoverflow.com/questions/2394485/get-posix-unix-time-in-seconds-and-nanoseconds-in-python) – Bill the Lizard Apr 06 '18 at 12:03
  • How can you trust that the nano-second value is correct when you have a lot of cores? What are you going to do, take the nano-second value of a function that runs at micro-second intervals? No program will run at Nano second level, only the hardware can go to that level. – dsgdfg Apr 06 '18 at 12:23
  • also: If you've got a nano-second level DB entry have proplem very serious. In buffer memory: "can not write last value as initial value (what is array)?" – dsgdfg Apr 06 '18 at 12:33
  • thank you, did it in simple way. Just took builtin timestamp function and converterted it to NS (x100000000). – saddayz Apr 10 '18 at 06:33

0 Answers0