GNOME Bugzilla – Bug 587614
Method to measure how long a window is showing up
Last modified: 2009-08-12 15:41:06 UTC
I would love to have a method that returns the time (in milliseconds) that a window has been showing in the screen. Right now I use: waittillguiexists(window) start_time = time.time() waittillguinotexists(window) end_time = time.time() but that has a measure error of about 1.5 seconds. It would be great to have something like: time = showing_time(window) that will return how long the window was showing on the screen.
Created attachment 140170 [details] [review] Proposed patch windowuptime('dlgRunApplication') Returns (datetime.datetime(2009, 8, 7, 19, 22, 42), datetime.datetime(2009, 8, 7, 19, 22, 48)) First one start time, the next one is end time - python datetime instace Is this fine ? The input argument, for now will be LDTP convention like dlgWindowName etc. Please let me know, if this is okay ? Waiting for your response, before committing it :) Thanks
This is perfect solution. Thanks!
Thanks for the bug report. Committed the fix in git. Will document it soon :)