|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Simple question: How to find Elapsed time (in seconds)I need to display elapsed time for a process in VB.NET in secods.
What's the routine to do this? Thanks Bill How about something simple like:
Dim StartTime As DateTime = Now 'Any processing here ... ElapsedTime = Now.Subtract(StartTime).TotalSeconds Dim ElapsedTime As Double = Now.Subtract(StartTime).TotalSeconds MsgBox("Elapsed seconds: " & ElapsedTime, MsgBoxStyle.Information) -tom Bill Nguyen ha scritto: Show quoteHide quote > I need to display elapsed time for a process in VB.NET in secods. > What's the routine to do this? > Thanks > > Bill Works great!
Thanks Tomaso! Bill <tommaso.gasta***@uniroma1.it> wrote in message Show quoteHide quote news:1141679714.714292.14890@j33g2000cwa.googlegroups.com... > How about something simple like: > > Dim StartTime As DateTime = Now > > 'Any processing here ... > > ElapsedTime = Now.Subtract(StartTime).TotalSeconds > Dim ElapsedTime As Double = > Now.Subtract(StartTime).TotalSeconds > MsgBox("Elapsed seconds: " & ElapsedTime, > MsgBoxStyle.Information) > > -tom > > Bill Nguyen ha scritto: > >> I need to display elapsed time for a process in VB.NET in secods. >> What's the routine to do this? >> Thanks >> >> Bill > Bill,
As addition you can as well use the environment.tickcount or The new stopwatch class 2.0 http://msdn2.microsoft.com/en-us/library/system.diagnostics.stopwatch.aspx I hope this helps, Cor Show quoteHide quote "Bill Nguyen" <billn_nospam_please@jaco.com> schreef in bericht news:OYPdHIVQGHA.5116@TK2MSFTNGP10.phx.gbl... >I need to display elapsed time for a process in VB.NET in secods. > What's the routine to do this? > Thanks > > Bill >
VSTO 2005 - Read Range from excel
Create application to extract data from excel sheet How can we mail some file without mentioning the SMTP server addre OOP / 3-Tier development questions VB.NET 2005 & XML writing custom event for minimise, restore and close buttons Convert Script code to VB.Net How to create a Service to Log Application Names Re: "Visual Web Developer does not support creating Web sites on a Macros too slow ! |
|||||||||||||||||||||||