예제 #1
0
파일: cairo-time.c 프로젝트: IngenicC/xboot
cairo_time_t
_cairo_time_get (void)
{
    struct timespec t;
    cairo_time_t r;

    clock_gettime (CAIRO_CLOCK, &t);

    r = _cairo_double_to_int64 (_cairo_time_1s ());
    r = _cairo_int64_mul (r, _cairo_int32_to_int64 (t.tv_sec));
    r = _cairo_int64_add (r, _cairo_int32_to_int64 (t.tv_nsec));

    return r;
}
예제 #2
0
파일: cairo-time.c 프로젝트: IngenicC/xboot
cairo_time_t
_cairo_time_get (void)
{
    struct timeval t;
    cairo_time_t r;

    gettimeofday (&t, NULL);

    r = _cairo_double_to_int64 (_cairo_time_1s ());
    r = _cairo_int64_mul (r, _cairo_int32_to_int64 (t.tv_sec));
    r = _cairo_int64_add (r, _cairo_int32_to_int64 (t.tv_usec));

    return r;
}
예제 #3
0
파일: cairo-time.c 프로젝트: mgya/xCairo
cairo_time_t
_cairo_time_get (void)
{
//    struct timeval t;
    xdate_time_t t;
    cairo_time_t r;

//    gettimeofday (&t, XNULL);
    xtime_localTime(xtime_clock(), &t);

    r = _cairo_double_to_int64 (_cairo_time_1s ());
    r = _cairo_int64_mul (r, _cairo_int32_to_int64 (t.second));

//    r = _cairo_int64_mul (r, _cairo_int32_to_int64 (t.tv_sec));
//    r = _cairo_int64_add (r, _cairo_int32_to_int64 (t.tv_usec));

    return r;
}
예제 #4
0
파일: cairo-time.c 프로젝트: IngenicC/xboot
cairo_time_t
_cairo_time_from_s (double t)
{
    return _cairo_double_to_int64 (t * _cairo_time_ticks_per_sec ());
}