• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 190
  • Last Modified:

time

How to delay a little period of time precisely in vc++? For example ,just 10 milliseconds.
0
traver
Asked:
traver
  • 2
  • 2
1 Solution
 
MDarlingCommented:
try

Sleep(10);

this should send your thread to sleep
for exactly 10 ms.

regards,
Mike.
0
 
MDarlingCommented:
Proviso to above comment.

It will only be exact if there are no
higher priority threads running on the
system.

You can raise the priority of your thread
by calling SetThreadPriority();

regards,
Mike.
0
 
traverAuthor Commented:
Thank you very much,Mike,I'll try.
0
 
traverAuthor Commented:
How about delaying 0.1 or 0.001 millisecond?
0

Featured Post

[Webinar] Kill tickets & tabs using PowerShell

Are you tired of cycling through the same browser tabs everyday to close the same repetitive tickets? In this webinar JumpCloud will show how you can leverage RESTful APIs to build your own PowerShell modules to kill tickets & tabs using the PowerShell command Invoke-RestMethod.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now