Click here to Skip to main content
15,925,505 members
Home / Discussions / C#
   

C#

 
AnswerRe: Bingo Cards in C# (Graphics and Printing Question) Pin
Ravadre13-Feb-09 7:09
Ravadre13-Feb-09 7:09 
AnswerRe: Bingo Cards in C# (Graphics and Printing Question) Pin
musefan13-Feb-09 7:13
musefan13-Feb-09 7:13 
AnswerRe: Bingo Cards in C# (Graphics and Printing Question) Pin
Luc Pattyn13-Feb-09 7:25
sitebuilderLuc Pattyn13-Feb-09 7:25 
AnswerRe: Bingo Cards in C# (Graphics and Printing Question) Pin
PIEBALDconsult13-Feb-09 12:29
mvePIEBALDconsult13-Feb-09 12:29 
QuestionCreating the equivalent of a 10ms interrupt timer Pin
Bruce Coward13-Feb-09 5:54
Bruce Coward13-Feb-09 5:54 
AnswerRe: Creating the equivalent of a 10ms interrupt timer Pin
Ennis Ray Lynch, Jr.13-Feb-09 6:46
Ennis Ray Lynch, Jr.13-Feb-09 6:46 
AnswerRe: Creating the equivalent of a 10ms interrupt timer Pin
TCHamilton13-Feb-09 7:01
TCHamilton13-Feb-09 7:01 
AnswerRe: Creating the equivalent of a 10ms interrupt timer Pin
Ravadre13-Feb-09 7:03
Ravadre13-Feb-09 7:03 
Hello,

Remeber that when working on Windows, you have to face that your threads will be scheduled by OS, so sometimes getting exact timing is not possible. If you need about 10ms resolution, considering fact that threads gets about 10ms every time they are executed (that's simplified truth), I would try fe. such approach:

1. Check how much time has elapsed since last update.
2. If not enough, yield.
2. Set new "last update" to now.
3. Do some stuff.
4. Yield.

For timing you could use System.Diagnostics.Stopwatch timer. This one will use Query.. mechanism if possible to measure time, and that means even about 0.1ms resolution afair. This is the better timer you can get.
For yielding you could use fe. Sleep(0).

I don't know if this idea would work as expected, but maybe it's worth trying out.
AnswerRe: Creating the equivalent of a 10ms interrupt timer Pin
Luc Pattyn13-Feb-09 7:21
sitebuilderLuc Pattyn13-Feb-09 7:21 
GeneralRe: Creating the equivalent of a 10ms interrupt timer Pin
Bruce Coward16-Feb-09 5:51
Bruce Coward16-Feb-09 5:51 
AnswerRe: Creating the equivalent of a 10ms interrupt timer Pin
Luc Pattyn16-Feb-09 6:11
sitebuilderLuc Pattyn16-Feb-09 6:11 
GeneralRe: Creating the equivalent of a 10ms interrupt timer Pin
Bruce Coward16-Feb-09 6:31
Bruce Coward16-Feb-09 6:31 
QuestionProperty in custom control inserts unnecessary lines in designer code Pin
jbrammeier13-Feb-09 5:44
jbrammeier13-Feb-09 5:44 
AnswerRe: Property in custom control inserts unnecessary lines in designer code Pin
DaveyM6913-Feb-09 7:37
professionalDaveyM6913-Feb-09 7:37 
GeneralRe: Property in custom control inserts unnecessary lines in designer code Pin
jbrammeier13-Feb-09 7:46
jbrammeier13-Feb-09 7:46 
GeneralRe: Property in custom control inserts unnecessary lines in designer code Pin
jbrammeier13-Feb-09 10:47
jbrammeier13-Feb-09 10:47 
GeneralRe: Property in custom control inserts unnecessary lines in designer code Pin
DaveyM6913-Feb-09 23:48
professionalDaveyM6913-Feb-09 23:48 
QuestionHow to add wmp.ocx file to toolbox? Pin
Sokka9313-Feb-09 5:16
Sokka9313-Feb-09 5:16 
AnswerRe: How to add wmp.ocx file to toolbox? Pin
Sokka9314-Feb-09 4:16
Sokka9314-Feb-09 4:16 
QuestionGet Datagrid handle and get invidual cells handles Pin
Brian Garnica13-Feb-09 4:45
Brian Garnica13-Feb-09 4:45 
AnswerRe: Get Datagrid handle and get invidual cells handles Pin
Henry Minute13-Feb-09 5:38
Henry Minute13-Feb-09 5:38 
GeneralRe: Get Datagrid handle and get invidual cells handles Pin
Brian Garnica13-Feb-09 6:07
Brian Garnica13-Feb-09 6:07 
GeneralRe: Get Datagrid handle and get invidual cells handles Pin
Henry Minute13-Feb-09 6:34
Henry Minute13-Feb-09 6:34 
GeneralRe: Get Datagrid handle and get invidual cells handles Pin
Brian Garnica13-Feb-09 6:49
Brian Garnica13-Feb-09 6:49 
QuestionEvents Pin
CodingYoshi13-Feb-09 4:37
CodingYoshi13-Feb-09 4:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.