freach / udatetime

Fast RFC3339 compliant Python date-time library
Other
241 stars 27 forks source link

Timestamp generation #27

Closed mkusz closed 6 years ago

mkusz commented 6 years ago

It would be nice to have some faster timestamp generation that one get from pure datetime.timestamp() or time.time(). It can be very useful for any logging, etc. in case of fast application (like load testing using locust.io)

freach commented 6 years ago

The time() implementation is already using straight C functions to create a timestamp. Depending on your OS it's basically create Python Float from gettimeofday. I'm afraid there is nothing to optimize here.