QueueTimer and TraceMsg

Add QueueTimer and TraceMsg function or class.