How to transform milliseconds into seconds .?

Konrad picture Konrad · Nov 14, 2010 · Viewed 28.8k times · Source

I have to transform my Stopwatch "Variable" into seconds ?

Stopwatch czasAlg = new Stopwatch(); 
czasAlg.Start();
//Do semothing
czasAlg.Stop();
Decimal Tn = czasAlg.ElapsedMilliseconds/(decimal)n;

Answer

Joey picture Joey · Nov 14, 2010

Divide by 1000 or use

czasAlg.Elapsed.TotalSeconds