Fix a bug with time clock

Fix the bug with time clock when capturing.
Now when the change of screen orientation happend it won't crash but
still has bugs.