Message408859
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. |
|
Date |
User |
Action |
Args |
2021-12-18 16:09:10 | gdr@garethrees.org | set | recipients:
+ gdr@garethrees.org, lemburg, tim.peters, mark.dickinson, belopolsky, giampaolo.rodola, pythonhacker, Arfrever, r.david.murray, andrewclegg, python-dev, Ramchandra Apte, Eli_B, serhiy.storchaka, goshawk, Niklas.Claesson, mdcb808@gmail.com, scoobydoo, tomikyos, p-ganssle, anglister |
2021-12-18 16:09:10 | gdr@garethrees.org | set | messageid: <1639843750.36.0.0799620979309.issue15443@roundup.psfhosted.org> |
2021-12-18 16:09:10 | gdr@garethrees.org | link | issue15443 messages |
2021-12-18 16:09:10 | gdr@garethrees.org | create | |
|