00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef _XLV_TIMER_H
00023 #define _XLV_TIMER_H
00024
00025 #include <glib.h>
00026
00027 typedef struct _XLV_Timer {
00028 guint32 m_time;
00029 gboolean m_realtime;
00030 guint32 m_start;
00031 } XLV_Timer;
00032
00033 #ifdef NO_INLINE
00034 #ifdef __cplusplus
00035 extern "C" {
00036 #endif
00037
00038 XLV_Timer *xlv_new_timer ();
00039 void xlv_release_timer (XLV_Timer * timer);
00040 void xlv_update_timer (XLV_Timer * timer, guint32 time);
00041 guint32 xlv_get_timer (XLV_Timer * timer);
00042 gboolean xlv_is_late (XLV_Timer * timer, guint32 time_stamp);
00043 gboolean xlv_is_timer_late (XLV_Timer * timer, XLV_Timer * ref_timer);
00044 void xlv_timer_wait (XLV_Timer * timer, XLV_Timer * ref_timer);
00045 void xlv_timer_start (XLV_Timer * timer);
00046 void xlv_timer_mark (XLV_Timer * timer);
00047
00048 #ifdef __cplusplus
00049 }
00050 #endif
00051 #else
00052 #define IN_HEADER
00053 #include "xlv_timer.c"
00054 #undef IN_HEADER
00055 #endif
00056
00057
00058 #endif