[NUI] Add checking if the Timer is used in main thread (#1179)