0

The documentation sais [1]

guint32 time; the time of the event in milliseconds.

Relative to what?

  • The time since latest event
  • Process lifetime
  • System boot time

I need to know the time when a key was hit.

[1] https://developer.gnome.org/gdk3/stable/gdk3-Event-Structures.html#GdkEventKey

user877329
  • 6,717
  • 8
  • 46
  • 88
  • Maybe add a link to the documentation? – Pekka Dec 31 '15 at 09:56
  • It uses the same timestamp its backend does (e.g. XLib on linux/xorg), so I don't think you can rely on its value, only compare it to other events timestamps. – keltar Jan 01 '16 at 06:36
  • @keltar Does GTK have an API for retrieving a reference timestamp. – user877329 Jan 01 '16 at 09:54
  • 1
    @user877329 http://stackoverflow.com/questions/22629487/how-to-compare-gdkevent-timestamp-with-current-time says to use `g_get_monotonic_time` and convert it to miliseconds, but I don't see any references saying it is *required* to be so. It probably works on most platforms though. – keltar Jan 02 '16 at 08:49

0 Answers0