Zināšanu bāze

Stopwatch klase (.NET 2.0)

Kad runa nonāk līdz ātrdarbībai un optimālai resursu izmantošanai, palīgā nāk profilēšanas programmas (Profilers).
Bet šoreiz runa ies par noderīgu klasi
System.Diagnostics.Stopwatch (iekš system.dll). Tās galvenais uzdevums ir piefiksēt laika sprīdi starp skaitītāja palaišanu un  apstadināšanu ar augstu precizitāti. Noderīgs instruments fiklējot koda izpildes laiku.  Sistēmatiski to pielietojot, pavēras ātri iespēja noteikt apgabalus, kuriem ir jāpieverš uzmanību.

Piemērs:            
... 
Stopwatch stopwatch = Stopwatch.StartNew ();
...


// Kods
 

...

stopwatch.Stop ();


Console
.WriteLine(stopwatch.Elapsed.ToString ());

Posted Oct 24 2007, 03:25 PM by andrejs.mamontovs

Comments

buy google +1 wrote re: Stopwatch klase (.NET 2.0)
on 03-23-2012 1:53

lOV7wo wow, awesome blog article.Really looking forward to read more. Cool.

Chaitali wrote re: Stopwatch klase (.NET 2.0)
on 05-17-2012 12:35

Yo, that's what's up tutrhfully.

Dhian wrote re: Stopwatch klase (.NET 2.0)
on 05-19-2012 4:31

Thanks for that! It's just the answer I neeedd.

Cheap Article Submission wrote re: Stopwatch klase (.NET 2.0)
on 06-30-2012 4:43

w0eLut Very good post.Thanks Again. Awesome.

Seo Services wrote re: Stopwatch klase (.NET 2.0)
on 08-06-2012 18:06

e1KKXo I value the blog article.Really thank you! Awesome.

cheap seo services wrote re: Stopwatch klase (.NET 2.0)
on 10-08-2012 15:06

OOVsWF Thanks a lot for the article post.Really looking forward to read more. Great.

cheap seo services wrote re: Stopwatch klase (.NET 2.0)
on 11-09-2012 16:08

OeRlyK Im obliged for the blog post.Really thank you! Awesome.

Fiverr best selles wrote re: Stopwatch klase (.NET 2.0)
on 11-28-2012 12:17

SNPL1e Great, thanks for sharing this blog post.Much thanks again. Great.

buy viagra wrote re: Stopwatch klase (.NET 2.0)
on 12-24-2012 11:18

9du28u Fantastic blog post. Will read on...

Social bookmarks wrote re: Stopwatch klase (.NET 2.0)
on 03-25-2013 2:20

18qmHH Wow, great post.Really looking forward to read more. Cool.

Add a Comment

(obligāts)  
(brīvizvēles)
(obligāts)  
Remember Me?