Creating single thread

Create single threand andwait 5 seconds for end of it.
Waiting for end of thread

Using function 'WaitForSingleObject' for end of thread.