Ejemplo n.º 1
0
int
_PyTime_ObjectToTimeval(PyObject *obj, time_t *sec, long *usec,
                        _PyTime_round_t round)
{
    int res;
    res = _PyTime_ObjectToDenominator(obj, sec, usec, 1e6, round);
    assert(0 <= *usec && *usec < SEC_TO_US);
    return res;
}
Ejemplo n.º 2
0
int
_PyTime_ObjectToTimespec(PyObject *obj, time_t *sec, long *nsec,
                         _PyTime_round_t round)
{
    int res;
    res = _PyTime_ObjectToDenominator(obj, sec, nsec, 1e9, round);
    assert(0 <= *nsec && *nsec < SEC_TO_NS);
    return res;
}
Ejemplo n.º 3
0
int
_PyTime_ObjectToTimeval(PyObject *obj, time_t *sec, long *usec,
                        _PyTime_round_t round)
{
    return _PyTime_ObjectToDenominator(obj, sec, usec, 1e6, round);
}
Ejemplo n.º 4
0
int
_PyTime_ObjectToTimespec(PyObject *obj, time_t *sec, long *nsec,
                         _PyTime_round_t round)
{
    return _PyTime_ObjectToDenominator(obj, sec, nsec, 1e9, round);
}