예제 #1
0
파일: pytime.c 프로젝트: 3lnc/cpython
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;
}
예제 #2
0
파일: pytime.c 프로젝트: 3lnc/cpython
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;
}
예제 #3
0
int
_PyTime_ObjectToTimeval(PyObject *obj, time_t *sec, long *usec,
                        _PyTime_round_t round)
{
    return _PyTime_ObjectToDenominator(obj, sec, usec, 1e6, round);
}
예제 #4
0
int
_PyTime_ObjectToTimespec(PyObject *obj, time_t *sec, long *nsec,
                         _PyTime_round_t round)
{
    return _PyTime_ObjectToDenominator(obj, sec, nsec, 1e9, round);
}