[VB6] Program's Performance
Ey,
In a VB6 Project I'm making it's an emulation server but I wanna make things interesting by adding a progress bar to display the performance of the server (if it starts to lag the performance rate drops, so the marks in the progress bar drop). How could I do this?
Re: [VB6] Program's Performance
I suppose you'd add a cycle counter to some part of the program and every x seconds check how many cycles the program managed to run?
Re: [VB6] Program's Performance
Re: [VB6] Program's Performance
Thanks Negata,
What components will I need? When I reformatted my laptop I kinda lost a few of my components in the task bar and I forgot what the name was. :/
Re: [VB6] Program's Performance
You wouldn't need any components
In 'simple terms' what Negata means is to add say a public value (CyclesRan for example) at a common part of your application For a server the most obvious would be at the end of your Data Received function (Which runs and processes data) And possibly inside any AI or NPC cycles that you have.
Then every so many seconds simply have your GUI output this 'Cycle' value as a progressbar value and reset it to 0.
~ Jeax
Re: [VB6] Program's Performance
If you want to use the CPU usage method, here's an example--
Get Windows 2000/XP CPU Usage by pt