MCPcopy Create free account
hub / github.com/apache/arrow / PyTime_to_us

Function PyTime_to_us

python/pyarrow/src/arrow/python/datetime.h:60–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58PyObject* NewMonthDayNanoTupleType();
59
60ARROW_PYTHON_EXPORT
61inline int64_t PyTime_to_us(PyObject* pytime) {
62 return (PyDateTime_TIME_GET_HOUR(pytime) * 3600000000LL +
63 PyDateTime_TIME_GET_MINUTE(pytime) * 60000000LL +
64 PyDateTime_TIME_GET_SECOND(pytime) * 1000000LL +
65 PyDateTime_TIME_GET_MICROSECOND(pytime));
66}
67
68ARROW_PYTHON_EXPORT
69inline int64_t PyTime_to_s(PyObject* pytime) { return PyTime_to_us(pytime) / 1000000; }

Callers 4

ConvertMethod · 0.85
PyTime_to_sFunction · 0.85
PyTime_to_msFunction · 0.85
PyTime_to_nsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected