Forum > GPU crunching

Sleeping for less than 1ms in Windows - is it possible and how?

<< < (2/5) > >>

Josef W. Segur:
There's http://stackoverflow.com/questions/85122/sleep-less-than-one-millisecond/11456112#11456112 which has some attempts. I do not know if that works.
                                                    Joe

Urs Echternacht:
http://www.tutorials.de/c-c/229782-c-sleep-kleiner-als-ms-2.html#post1197886

arkayn:

--- Quote from: Urs Echternacht on 30 Oct 2013, 08:11:39 pm ---http://www.tutorials.de/c-c/229782-c-sleep-kleiner-als-ms-2.html#post1197886

--- End quote ---

And a translated page for Raistmer
http://translate.google.com/translate?sl=auto&tl=ru&js=n&prev=_t&hl=en&ie=UTF-8&u=http%3A%2F%2Fwww.tutorials.de%2Fc-c%2F229782-c-sleep-kleiner-als-ms-2.html%23post1197886&act=url

and Joe
http://translate.google.com/translate?hl=en&sl=de&tl=en&u=http%3A%2F%2Fwww.tutorials.de%2Fc-c%2F229782-c-sleep-kleiner-als-ms-2.html%23post1197886

Urs Echternacht:
Thanks Arkayn. (german does not translate very good into english when done by a machine! In this case "security" should read "computer"!  ;) )

Here is some POSIX source : nanosleep.c

Here is same for apple : nanosleep.c

Additionally there is a function "clock_nanosleep()" which allows to choose between different clocks on Linux. (real time, monotonic, other)

Raistmer:

--- Quote from: Josef W. Segur on 30 Oct 2013, 07:55:01 pm ---There's http://stackoverflow.com/questions/85122/sleep-less-than-one-millisecond/11456112#11456112 which has some attempts. I do not know if that works.
                                                    Joe

--- End quote ---
No, Joe, I did some "google" at glance - it will not work.
The aim is not just wait for fraction of millisecond but _sleep_ (i.e., don't load CPU) for that fraction. I'm starting to do it's just impossible for windows to do cause required time less than system quantum ...

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version