|
The shortest period you can give up a time slice for is around 14 milliseconds on a Windows system. I think anytime you Sleep(...) you will sleep for some multiple of approx 14 milliseconds. Windows is not real time.
If you want to spin in a while loop to delay look into QueryPerformanceCounter in the msdn.
J
|
|
|
|
|
WinMM.lib gives possibility of one millisecond callbacks on a seperate thread, which one can boost priority to make sure free-running.
timeSetTimer & timeKillTimer are the relevant functions, viz. MSDN
Better than (+/-) 7mSecs, but perhaps not good enough?
Lymington
|
|
|
|
|
If you truly need to delay in microseconds you will probably have to resort to assembly language and NOOPs. There is absolutely no guarantee that this will be deterministic though.
__________________________________________
a two cent stamp short of going postal.
|
|
|
|
|
Maybe some directx articles would be good...
Actual Linux Penguins were harmed in the creation of this message.
|
|
|
|
|
Snyp wrote:
Actual Linux Penguins were harmed in the creation of this message.
what were you doing to the penguins when writing the message ?
MSN Messenger.
prakashnadar@msn.com
Tip of the day of visual C++ IDE.
"We use it before you do! Visual C++ was developed using Visual C++"
|
|
|
|
|
You sure do seem a bit excited to find out what Snyp was doing with that penguin.
Michael Flanakin
Web Log
|
|
|
|
|
Did someone say penguins?
Programming or Die?
----C++ 4 ever-----
|
|
|
|
|
Not sure if it appreciated to recommend other coding sites here, but for game development I think you should have a look at www.gamedev.net.
|
|
|
|
|
Hi, I'd be very thankful if someone could at least give me the basic idea on how to create a chat system where people can chat with each other and at the same time get to see each other via their webcams, I always wanted to create such a thing but don't know where to start... can someone help me please?
Oh! btw - is it at all possible to run such a thing completely through a website, you know how those paid webcam sites do it? I'm really a beginner any help would be really appreciated!!
"I have confused my intentions with my abilities."
|
|
|
|
|
|
How Can I Update an article i was submited it to CodeProject??
i found that i download the source of the article and what i should do after that??
|
|
|
|
|
From the CP FAQ[^]:How do I update my article?
If you used the submission wizard and your article has not yet been moved then you can click on the 'Modify this article' link just under the title of the article. If the article has been moved, or was posted by us directly, then the best thing to do is to take the HTML from your article's page on CodeProject, make your modifications to that, then send it to us, plus any zip files or images, and we'll update it for you. Don't worry about colorizing your code snippets. Our scripts do that all for you.
--Mike--
Personal stuff:: Ericahist | Homepage
Shareware stuff:: 1ClickPicGrabber | RightClick-Encrypt
CP stuff:: CP SearchBar v2.0.2 | C++ Forum FAQ
----
#include "witty-quote.h"
|
|
|
|
|
thx alot for the help...
so what is the email that i should to send to it the files??
|
|
|
|
|
|
thx alot good luck
|
|
|
|
|
On a related note, is it possible to edit a message on the forum?
This morning (well, it was AM for me!) I unintentionally hit submit (not looking what I'm doing). I'd have liked to be able to edit that submission, but I'm not sure how, so I posted a correction underneath.
Steve S
|
|
|
|
|
|
Bizzarely, I was about to delete my posting. I felt so stupid having finally noticed the [modify][delete] links, after GOK how long using CP.
In defence, your honour, I'd like to submit exhibit 'A', being a pair of old, no longer accurate prescription spectacles. I sit under an air vent, which makes my contacts uncomfortable for long periods....
Thanks anyway, though. My advanced age means I'll probably forget in a couple of days...
Steve S
|
|
|
|
|
hmm..last time I sent it to webmaster@CP
|
|
|
|
|
Hey Everyone!
Read my bio and you'll know why I am asking such a basic and/or stupid question. My "future" employer has a card reader that runs on WinXP. They want someone who, at least, has a basic knowledge of code. In order to find out what they are using to write the application I have to ask the VP of Tech. Now, I can't come off as a total idiot. So how could I best approach this? Any suggestions would be appreciated. Also, the job is in Saudi Arabia. That's a far piece for a southern boy! I only need the basics and have 60 days to study up. I can do that. But I need help on not coming off as a fool and getting my name tossed out of the running. My primary expertise is sales. So, I can talk my way through most things but this. I have hardware and software operating experience but have only dabbled in code.
HELP!!
Thanks
Please spell it out for me. I am starting from scratch.
|
|
|
|
|
uga81 wrote:
That's a far piece for a southern boy!
I'm now reading the remainder of your post with Zig Ziglar's voice going around in my head
Okay. Let's see... What sort of card reader? To read what sort of cards? Credit Cards? Identity Cards? Punch Cards?
Regardless, I would guess that the hardware element is most likely written in C (and/or C++) and assembler.
Windows XP is mostly written in C, C++ and assembler.
What exactly is the job? You never mentioned that. Just that coding will play a part (and by the sounds of it a small part) so I can't imaging that they'd throw you in with device driver coding as that is highly specialised.
Do you know what sort of coding/development they'll want you to do?
Anyway - if you have more information and feel it is kind of sensitive then I'm prepared to accept a private email on this one.
... And I'll see you.... At the top -- Zig Ziglar. (You can guess what just arrived in the post this morning!)
EuroCPian Spring 2004 Get Together[^]
"You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar
|
|
|
|
|
A lot of hardware device programming is done in C, or some variant thereof. A lot depends upon what level of programming is going to be required of you. Are you expected to modify the behavior of the card reader, or are you supposed to just interface with the device using a WinXP system? If the latter, C++ or even VB skills may be adequate to deal with the challenge. If the former, you need to sound as if you're an expert in real-time, embedded programming in C-like languages. From your description I'm betting that all you need to know is how to talk to the device and retrieve responses from it. For that purpose any modern language should be acceptable. Ask them what language they prefer, and bone up on it.
I've felt much better since I gave up hope.
|
|
|
|
|
can u suggest me 2 start socket programming.
i 'm still a begineer and i hv no knowledge of socket progg.
suggest me some books .
|
|
|
|
|
You don't say what language your wanting to use is so here's a good book for C#:
"C# Network Programming" by Richard Blum.
EuroCPian Spring 2004 Get Together[^]
"You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar
|
|
|
|
|
Make a search Socket programming from google.com etc
Magic has often been thought of us the art of making dreams come true; the art of realizing visions. Yet before we can bring birth to the vision we have to see it.
|
|
|
|