Hello everyone,
For my first post (woot!) I need a bit of input in a strange problem I'm having.
Ok here's the story, I'm writting a program who's interface is a picture animation. So at load time I store the frames of said animation on an array of a structure Frame. Frame contains a single bitmap (a frame, lol) and a region corresponding to that image.
Once the program finishes loading that, it starts a thread that continuously loops thru all the frames, updating the form's background image and its region (has a Thread.Sleep(20), before starting animation again).
works great, smooth animation.
Here's the thing, when I check the Performance tab under Task Manager, my CPU Usage is at 70-100% (1.5 ghz comp). I checked memory and it seems stable, no memory leaks.
Ok so here comes the mystery; sometimes, with my program running, the cpu usage is at 0-4% while other times it's at 70-100%. On both situations the only thing i'm running is my program.
Anyone know why this is happening?
For my first post (woot!) I need a bit of input in a strange problem I'm having.
Ok here's the story, I'm writting a program who's interface is a picture animation. So at load time I store the frames of said animation on an array of a structure Frame. Frame contains a single bitmap (a frame, lol) and a region corresponding to that image.
Once the program finishes loading that, it starts a thread that continuously loops thru all the frames, updating the form's background image and its region (has a Thread.Sleep(20), before starting animation again).
works great, smooth animation.
Here's the thing, when I check the Performance tab under Task Manager, my CPU Usage is at 70-100% (1.5 ghz comp). I checked memory and it seems stable, no memory leaks.
Ok so here comes the mystery; sometimes, with my program running, the cpu usage is at 0-4% while other times it's at 70-100%. On both situations the only thing i'm running is my program.
Anyone know why this is happening?