Okay, so... I've only worked with Java so far, and never even understood multithreading in that, but anyway, now I'm REALLY lost. Yes, I looked all over for tutorials, but they were all talking about applications in windows forms which have their own threading thing going on apparently, and mine is a console application. So here's my question. I have this (using Syste.Threading.Timer):
t = new Timer(callback, null, Timeout.Infinite, Timeout.Infinite);
t.Change(0, Settings.FRAMERATE); //Start the timer
Now what do I do? If I just say
while(true) { }
nothing happens. If I say
Thread.Sleep(500);
this thread sleeps for a bit, then executes again, but the timer doesn't actually work. Do I need to put the timer in a sperate object or something? Is Sytem.Threading.Timer the wrong one/should I use System.Timing.Timer?
Thanks and best of wishes,
xycos
"For sweetest things turn sour'st by their deeds;Lilies that fester smell far worse than weeds."- William Shakespere, Sonnet 94