How to use the GDKEvent's timestamp in c++? For example, I print it as unsigned int, its value is 4194719109, but the current time is 1395764110 which is gotten from time() of time.h. The current time of g_get_real_time() is 1395764110872217 which is a gint64 type value. it seems the g_get_real_time() is more accurate than time().
My purpose is to calculate how many times it has lasted from the time of GDKEvent occurred.
The
time
element ofGdkEvent
is in miliseconds. Comparing withg_get_monotonic_time()
(which is in µs) divided by1000
should work (make sure to check the sign and cast toguint32
before comparing)