Click here to Skip to main content
15,889,200 members
Home / Discussions / C#
   

C#

 
GeneralRe: Rating my Article Pin
loyal ginger19-Jan-10 4:43
loyal ginger19-Jan-10 4:43 
GeneralRe: Rating my Article Pin
0x3c019-Jan-10 5:12
0x3c019-Jan-10 5:12 
QuestionImporting a win32 dll in C# Pin
yeah100019-Jan-10 1:57
yeah100019-Jan-10 1:57 
AnswerRe: Importing a win32 dll in C# Pin
Luc Pattyn19-Jan-10 2:14
sitebuilderLuc Pattyn19-Jan-10 2:14 
AnswerRe: Importing a win32 dll in C# Pin
Rhys Gravell19-Jan-10 2:37
professionalRhys Gravell19-Jan-10 2:37 
AnswerRe: Importing a win32 dll in C# Pin
KarstenK19-Jan-10 2:51
mveKarstenK19-Jan-10 2:51 
GeneralRe: Importing a win32 dll in C# Pin
Sunil G19-Jan-10 4:35
Sunil G19-Jan-10 4:35 
QuestionSimple profiling question Pin
el_scrub19-Jan-10 1:45
el_scrub19-Jan-10 1:45 
Hi guys


I am simply trying to profile a sine function I created against Math.Sin(). From checking around using the DataTime.Now structure seems to be the one ppl mention to use. But when I profile and get the Tick values before and after they are the same !! even If I call the function multiple times ? I would be sure that the values would have been updated no !! Is there another source from which to get the system time in milliseconds ?

here is the code anyway ??

Thanks

static void Main(string[] args)
 {
     Sin mySin = new Sin();
     double sinValue = 39 * (Math.PI / 180);

     long before = DateTime.Now.Ticks;
     double good = Math.Sin(sinValue);

     long after = DateTime.Now.Ticks;

     long result = after - before;

     Console.WriteLine("Sin for {0} = {1}", sinValue, good);
     Console.WriteLine("Time taken : {0}", result);

     before = DateTime.Now.Ticks;
     double bad = mySin.SinFunction(sinValue , 6);
     after = DateTime.Now.Ticks;

     result = after - before;
     Console.WriteLine("MySin for {0} = {1}", sinValue, bad);
     Console.WriteLine("Time taken : {0} ", result);

     Console.ReadLine();
 }

AnswerRe: Simple profiling question Pin
harold aptroot19-Jan-10 1:49
harold aptroot19-Jan-10 1:49 
GeneralRe: Simple profiling question Pin
harold aptroot19-Jan-10 1:59
harold aptroot19-Jan-10 1:59 
GeneralRe: Simple profiling question Pin
el_scrub19-Jan-10 2:05
el_scrub19-Jan-10 2:05 
AnswerRe: Simple profiling question Pin
Harvey Saayman19-Jan-10 1:49
Harvey Saayman19-Jan-10 1:49 
GeneralRe: Simple profiling question Pin
el_scrub19-Jan-10 2:02
el_scrub19-Jan-10 2:02 
GeneralRe: Simple profiling question Pin
Harvey Saayman19-Jan-10 2:10
Harvey Saayman19-Jan-10 2:10 
AnswerRe: Simple profiling question Pin
Luc Pattyn19-Jan-10 2:17
sitebuilderLuc Pattyn19-Jan-10 2:17 
QuestionObject shape recognition Pin
viki8919-Jan-10 0:48
viki8919-Jan-10 0:48 
AnswerRe: Object shape recognition Pin
Keith Barrow19-Jan-10 0:55
professionalKeith Barrow19-Jan-10 0:55 
GeneralRe: Object shape recognition Pin
viki8919-Jan-10 0:59
viki8919-Jan-10 0:59 
GeneralRe: Object shape recognition Pin
Keith Barrow19-Jan-10 1:13
professionalKeith Barrow19-Jan-10 1:13 
GeneralRe: Object shape recognition Pin
viki8919-Jan-10 1:14
viki8919-Jan-10 1:14 
AnswerRe: Object shape recognition Pin
Ennis Ray Lynch, Jr.19-Jan-10 8:19
Ennis Ray Lynch, Jr.19-Jan-10 8:19 
GeneralRe: Object shape recognition Pin
viki8919-Jan-10 8:31
viki8919-Jan-10 8:31 
AnswerRe: Object shape recognition Pin
Eddy Vluggen19-Jan-10 10:44
professionalEddy Vluggen19-Jan-10 10:44 
QuestionIP Address Error Pin
kk.tvm19-Jan-10 0:41
kk.tvm19-Jan-10 0:41 
AnswerRe: IP Address Error PinPopular
Keith Barrow19-Jan-10 0:50
professionalKeith Barrow19-Jan-10 0:50 

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.