Gareth Rees <g...@garethrees.org> added the comment:

I also have a use case that would benefit from nanosecond resolution in 
Python's datetime objects, that is, representing and querying the results of 
clock_gettime() in a program trace.

On modern Linuxes with a vDSO, clock_gettime() does not require a system call 
and completes within a few nanoseconds. So Python's datetime objects do not 
have sufficient resolution to distinguish between adjacent calls to 
clock_gettime().

This means that, like Mark Dickinson above, I have to choose between using 
datetime for queries (which would be convenient) and accepting that nearby 
events in the trace may be indistinguishable, or implementing my own 
datetime-like data structure.

----------
nosy: +g...@garethrees.org

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue15443>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to