コード例 #1
0
void setSharedTimerFireTime(double fireTime)
{
    double interval = fireTime - currentTime();

    stopSharedTimer();
    g_sharedTimer = ecore_timer_add(interval, timerEvent, 0);
}
コード例 #2
0
ファイル: Timer.cpp プロジェクト: Crawping/davinci
void updateSharedTimer()
{
    if (timersReadyToFire || deferringTimers || !timerHeap || timerHeap->isEmpty())
        stopSharedTimer();
    else
        setSharedTimerFireTime(timerHeap->first()->m_nextFireTime);
}
コード例 #3
0
void setSharedTimerFireInterval(double interval)
{
    ASSERT(sharedTimerFiredFunction);

    guint intervalInMS = static_cast<guint>(interval * 1000);

    stopSharedTimer();
    sharedTimer = g_timeout_add_full(GDK_PRIORITY_REDRAW, intervalInMS, timeout_cb, 0, 0);
}
コード例 #4
0
ファイル: SharedTimerGtk.cpp プロジェクト: MYSHLIFE/webkit
void setSharedTimerFireInterval(double interval)
{
    ASSERT(sharedTimerFiredFunction);

    guint intervalInMS = static_cast<guint>(interval * 1000);

    stopSharedTimer();
    sharedTimer = g_timeout_add_full(GDK_PRIORITY_REDRAW, intervalInMS, sharedTimerTimeoutCallback, 0, 0);
    g_source_set_name_by_id(sharedTimer, "[WebKit] sharedTimerTimeoutCallback");
}
コード例 #5
0
// The fire time is relative to the classic POSIX epoch of January 1, 1970,
// as the result of currentTime() is.
void setSharedTimerFireTime(double fireTime) 
{
    assert(sharedTimerFiredFunction);

    double interval = fireTime - currentTime();
    uint32 intervalInUS = 0;
    if (interval > 0) {
        interval = interval * 1000 * 1000;
        intervalInUS = static_cast<uint32>(interval);
    }

    if (intervalInUS < 1)
        intervalInUS = 1;

    stopSharedTimer();

    timereq->Time.Seconds = intervalInUS / (1000 * 1000);
    timereq->Time.Microseconds = intervalInUS % (1000 * 1000);
    IExec->SendIO((struct IORequest *)timereq);
}