Click here to Skip to main content
15,902,112 members
Home / Discussions / C#
   

C#

 
GeneralRe: C# Functionality(DLL) to VB.NET Pin
Vimalsoft(Pty) Ltd23-Apr-08 23:13
professionalVimalsoft(Pty) Ltd23-Apr-08 23:13 
GeneralBenchmark not Benching Pin
Reelix23-Apr-08 21:40
Reelix23-Apr-08 21:40 
I'm attempting to code a mini processor benchmarking program(For fun Big Grin | :-D )

The problem is... Marks are always 0 WTF | :WTF:


marks is a global int variable

string myWord = "1234567890";<br />
            StreamWriter sw = new StreamWriter(@"C:\benchMe.txt");<br />
            for (int j = 0; j < 1000; j++)<br />
            {<br />
                sw.Write(myWord);<br />
            }<br />
            sw.Flush();<br />
            sw.Close();<br />
            timer1.Interval = 1;<br />
            MessageBox.Show("Test Ready!");<br />
            StreamReader sr = new StreamReader(@"C:\benchMe.txt");<br />
            string bob = sr.ReadToEnd();<br />
            sr.Close();<br />
            timer1.Enabled = true;<br />
            // Begin Benchmark<br />
            Console.WriteLine(bob);<br />
            // There's a LARGE delay here.<br />
            timer1.Enabled = false;<br />
            MessageBox.Show("Marks on Test: " + marks);<br />
            marks = 0;<br />
<br />
private void timer1_Tick(object sender, EventArgs e)<br />
        {<br />
            marks++;<br />
        }


Any ideas?

I was thinking that maybe the "Lag" was canceling the increment on the timer, or something...

Any ideas, anyone? Smile | :)
GeneralRe: Benchmark not Benching Pin
Razvan Dimescu23-Apr-08 22:24
Razvan Dimescu23-Apr-08 22:24 
GeneralRe: Benchmark not Benching Pin
Reelix23-Apr-08 22:34
Reelix23-Apr-08 22:34 
GeneralRe: Benchmark not Benching Pin
Razvan Dimescu23-Apr-08 22:36
Razvan Dimescu23-Apr-08 22:36 
GeneralRe: Benchmark not Benching Pin
J a a n s23-Apr-08 22:42
professionalJ a a n s23-Apr-08 22:42 
GeneralRe: Benchmark not Benching Pin
Reelix23-Apr-08 22:57
Reelix23-Apr-08 22:57 
GeneralRe: Benchmark not Benching Pin
c242323-Apr-08 23:33
c242323-Apr-08 23:33 
GeneralRe: Benchmark not Benching Pin
Reelix23-Apr-08 23:37
Reelix23-Apr-08 23:37 
GeneralRe: Benchmark not Benching Pin
c242323-Apr-08 23:40
c242323-Apr-08 23:40 
GeneralDatagrid Issue Pin
Member 400849223-Apr-08 21:23
Member 400849223-Apr-08 21:23 
GeneralRe: Datagrid Issue Pin
Harini N K23-Apr-08 22:28
Harini N K23-Apr-08 22:28 
GeneralRe: Datagrid Issue Pin
John_Adams23-Apr-08 22:41
John_Adams23-Apr-08 22:41 
GeneralDynamically allocate memory for Struct Objects Pin
cute7868523-Apr-08 21:09
cute7868523-Apr-08 21:09 
GeneralRe: Dynamically allocate memory for Struct Objects Pin
Giorgi Dalakishvili23-Apr-08 21:18
mentorGiorgi Dalakishvili23-Apr-08 21:18 
GeneralRe: Dynamically allocate memory for Struct Objects Pin
Guffa23-Apr-08 21:50
Guffa23-Apr-08 21:50 
QuestionClickOnce Config File Problem Pin
Programm3r23-Apr-08 20:51
Programm3r23-Apr-08 20:51 
QuestionGraphic Problem Pin
Reza Shojaee23-Apr-08 20:30
Reza Shojaee23-Apr-08 20:30 
GeneralRe: Graphic Problem Pin
Giorgi Dalakishvili23-Apr-08 20:56
mentorGiorgi Dalakishvili23-Apr-08 20:56 
GeneralRe: Graphic Problem Pin
Reza Shojaee23-Apr-08 21:06
Reza Shojaee23-Apr-08 21:06 
GeneralRe: Graphic Problem Pin
Giorgi Dalakishvili23-Apr-08 21:08
mentorGiorgi Dalakishvili23-Apr-08 21:08 
GeneralRe: Graphic Problem Pin
Reza Shojaee23-Apr-08 21:16
Reza Shojaee23-Apr-08 21:16 
GeneralWaitOne with 0 as timeout value Pin
George_George23-Apr-08 20:23
George_George23-Apr-08 20:23 
Generalproblem with DataBase Path While uploading Images Pin
avvaru.murali23-Apr-08 20:14
avvaru.murali23-Apr-08 20:14 
GeneralRe: problem with DataBase Path While uploading Images Pin
Spunky Coder23-Apr-08 20:30
Spunky Coder23-Apr-08 20:30 

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.